Chat with AI Characters Offline.
Runs locally. Zero-configuration.
Supports Llama 2 & GPU Acceleration
Download Desktop App
headers = {
'Authorization': 'auth.strategy=local',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'en-US,en;q=0.9',
'Cache-Control': 'no-cache',
'Cookie': 'auth.strategy=local; i18n_redirected=en',
'Pragma': 'no-cache',
'Sec-CH-UA': '"Not?A_Brand";v="8", "Chromium";v="108"',
'Sec-CH-UA-Mobile': '?0',
'Sec-CH-UA-Platform': 'Windows',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-User': '?1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}
response = requests.get('Example Domain', headers=headers)
print(response.headers)
import requests
headers = {
'Authorization': 'www.example.com,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'en-US,en;q=0.9',
'Cache-Control': 'no-cache',
'Cookie': 'auth.strategy=local; i18n_redirected=en',
'Pragma': 'no-cache',
'Sec-Ch-Ua': '"Not?A_Brand";v="8", "Chromium";v="108"',
'Sec-Ch-Ua-Mobile': '?0',
'Sec-Ch-Ua-Platform': 'Windows',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-User': '?1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}
response = requests.get('Example Domain', headers=headers)
import requests
headers = {
'authority': 'www.example.com',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'accept-language': 'en-US,en;q=0.9',
'cache-control': 'no-cache',
'cookie': 'auth.strategy=local; i18n_redirected=en',
'pragma': 'no-cache',
'sec-ch-ua': '"Not?A_Brand";v="8", "Chromium";v="108"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'same-origin',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}
response = requests.get('Example Domain', headers=headers)
How do you access Llama2 (and future new releases) from h2oGPT w/ the total UI like here?@Macallik86
h2ogpt has Llama 2 up on their site already.
h2oGPT [meta-llama/Llama-2-7b-chat-hf]
convert the curl header parameters to python requests headers code
-H 'authority: www.example.com'
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
-H 'accept-language: en-US,en;q=0.9'
-H 'cache-control: no-cache'
-H 'cookie: auth.strategy=local; i18n_redirected=en'
-H 'pragma: no-cache'
-H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "Windows"'
-H 'sec-fetch-dest: document'
-H 'sec-fetch-mode: navigate'
-H 'sec-fetch-site: same-origin'
-H 'sec-fetch-user: ?1'
-H 'upgrade-insecure-requests: 1'
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' \
Sure! Here are the equivalent Python requests headers for the curl command you provided:
Code:headers = { 'Authorization': 'auth.strategy=local', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Accept-Language': 'en-US,en;q=0.9', 'Cache-Control': 'no-cache', 'Cookie': 'auth.strategy=local; i18n_redirected=en', 'Pragma': 'no-cache', 'Sec-CH-UA': '"Not?A_Brand";v="8", "Chromium";v="108"', 'Sec-CH-UA-Mobile': '?0', 'Sec-CH-UA-Platform': 'Windows', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-User': '?1', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' } response = requests.get('Example Domain', headers=headers) print(response.headers)
Please note that some of the headers in the curl command have been combined or modified in the Python requests code to match the syntax and values expected by the library. Additionally, some headers have been added or modified to include the correct values for the requests library.
h2oGPT [meta-llama/Llama-2-13b-chat-hf]
convert the curl header parameters to python requests headers code
-H 'authority: www.example.com'
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
-H 'accept-language: en-US,en;q=0.9'
-H 'cache-control: no-cache'
-H 'cookie: auth.strategy=local; i18n_redirected=en'
-H 'pragma: no-cache'
-H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "Windows"'
-H 'sec-fetch-dest: document'
-H 'sec-fetch-mode: navigate'
-H 'sec-fetch-site: same-origin'
-H 'sec-fetch-user: ?1'
-H 'upgrade-insecure-requests: 1'
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' \
Sure! Here are the Python requests headers converted from the curl command you provided:
Code:import requests headers = { 'Authorization': 'www.example.com, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Accept-Language': 'en-US,en;q=0.9', 'Cache-Control': 'no-cache', 'Cookie': 'auth.strategy=local; i18n_redirected=en', 'Pragma': 'no-cache', 'Sec-Ch-Ua': '"Not?A_Brand";v="8", "Chromium";v="108"', 'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Platform': 'Windows', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-User': '?1', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' } response = requests.get('Example Domain', headers=headers)
Note that I had to remove the space before the = in the Accept header, as requests does not allow spaces in header names. Also, I had to use a dictionary to define the headers, as requests does not allow multiple headers with the same name.
h2oGPT [meta-llama/Llama-2-70b-chat-hf]
convert the curl header parameters to python requests headers code
-H 'authority: www.example.com'
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
-H 'accept-language: en-US,en;q=0.9'
-H 'cache-control: no-cache'
-H 'cookie: auth.strategy=local; i18n_redirected=en'
-H 'pragma: no-cache'
-H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "Windows"'
-H 'sec-fetch-dest: document'
-H 'sec-fetch-mode: navigate'
-H 'sec-fetch-site: same-origin'
-H 'sec-fetch-user: ?1'
-H 'upgrade-insecure-requests: 1'
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' \
Sure! Here's the equivalent Python requests code for the given cURL command:
Code:import requests headers = { 'authority': 'www.example.com', 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'accept-language': 'en-US,en;q=0.9', 'cache-control': 'no-cache', 'cookie': 'auth.strategy=local; i18n_redirected=en', 'pragma': 'no-cache', 'sec-ch-ua': '"Not?A_Brand";v="8", "Chromium";v="108"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'sec-fetch-dest': 'document', 'sec-fetch-mode': 'navigate', 'sec-fetch-site': 'same-origin', 'sec-fetch-user': '?1', 'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' } response = requests.get('Example Domain', headers=headers)
Note that I've removed the -H prefix from the header names, as they are not needed in Python requests. Also, the ' characters around the values of some headers were unnecessary, so I've removed them for clarity.
70B was the only one not to replace 'Authority' with 'Authorization'
How do you access Llama2 (and future new releases) from h2oGPT w/ the total UI like here?
Falcon is doing the job for now, but I don't even see Llama2 as an option
https://web.archive.org/web/20230722082136/https://new.reddit.com/r/LocalLLaMA/comments/155po2p/get_llama_2_prompt_format_right/