Spaces:
Runtime error
Runtime error
Nitish Raghav
commited on
Update gptcall.py
Browse files- gptcall.py +4 -2
gptcall.py
CHANGED
|
@@ -10,11 +10,13 @@ config = configparser.ConfigParser()
|
|
| 10 |
config.read('test.env')
|
| 11 |
API_KEY = config.get('API', 'OPEN_AI_KEY')
|
| 12 |
API_URL = config.get('API', 'OPEN_AI_URL')
|
| 13 |
-
print(API_URL,API_KEY)
|
| 14 |
# Set the OpenAI API key
|
| 15 |
openai.api_key = "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"
|
| 16 |
|
| 17 |
-
def generate(prompt
|
|
|
|
|
|
|
| 18 |
try:
|
| 19 |
response = openai.ChatCompletion.create(
|
| 20 |
model="gpt-4-turbo",
|
|
|
|
| 10 |
config.read('test.env')
|
| 11 |
API_KEY = config.get('API', 'OPEN_AI_KEY')
|
| 12 |
API_URL = config.get('API', 'OPEN_AI_URL')
|
| 13 |
+
# print(API_URL,API_KEY)
|
| 14 |
# Set the OpenAI API key
|
| 15 |
openai.api_key = "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"
|
| 16 |
|
| 17 |
+
def generate(prompt
|
| 18 |
+
print(API_URL,API_KEY)
|
| 19 |
+
|
| 20 |
try:
|
| 21 |
response = openai.ChatCompletion.create(
|
| 22 |
model="gpt-4-turbo",
|