Spaces:
Sleeping
Sleeping
Synced repo using 'sync_with_huggingface' Github Action
Browse files
gpt.py
CHANGED
@@ -1,13 +1,2 @@
|
|
1 |
|
2 |
-
|
3 |
-
try:
|
4 |
-
response = openai.ChatCompletion.create(
|
5 |
-
model=model,
|
6 |
-
messages=[
|
7 |
-
{"role": "system", "content": "You are a helpful assistant."},
|
8 |
-
{"role": "user", "content": prompt}
|
9 |
-
]
|
10 |
-
)
|
11 |
-
return response['choices'][0]['message']['content']
|
12 |
-
except Exception as e:
|
13 |
-
return str(e)
|
|
|
1 |
|
2 |
+
haha
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|