diff --git a/.gitignore b/.gitignore index 2d8941d..d33068c 100644 --- a/.gitignore +++ b/.gitignore @@ -167,4 +167,6 @@ data.db database premium-key.txt premium.db -guildscount.py \ No newline at end of file +guildscount.py + +*.ovpn \ No newline at end of file diff --git a/code/google-palm-process.py b/code/google-palm-process.py new file mode 100644 index 0000000..1dacf03 --- /dev/null +++ b/code/google-palm-process.py @@ -0,0 +1,32 @@ +import requests + +proxy_url = 'http://64.225.4.12:9991' # Replace with your actual proxy URL and port + +api_key = 'AIzaSyCqIBAf0STUTVq7pizT3XtMcQQ_zgy9UGU' +model_name = 'chat-bison-001' +api_url = f'https://autopush-generativelanguage.sandbox.googleapis.com/v1beta2/models/{model_name}:generateMessage?key={api_key}' + +headers = { + 'Content-Type': 'application/json' +} + +data = { + 'prompt': { + 'messages': [{'content': 'hi'}] + }, + 'temperature': 0.1, + 'candidateCount': 1 +} + +proxies = { + 'http': proxy_url, + 'https': proxy_url +} + +response = requests.post(api_url, headers=headers, json=data, proxies=proxies) + +if response.status_code == 200: + result = response.json() + print(result) +else: + print(f'Request failed with status code {response.status_code}')