Sk4467 commited on
Commit
c0a942e
1 Parent(s): ff65af0

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. gpt.py +1 -12
gpt.py CHANGED
@@ -1,13 +1,2 @@
1
 
2
- def get_chat_completion(prompt, model="gpt-3.5-turbo"):
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