Hatman commited on
Commit
074ccc3
·
verified ·
1 Parent(s): b971559

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -91,6 +91,7 @@ async def core():
91
 
92
 
93
  def getPrompt(prompt, modelID, attempts=1):
 
94
  if modelID != magic_prompt_model:
95
  chat = [
96
  {"role": "user", "content": prompt_base},
@@ -98,7 +99,7 @@ def getPrompt(prompt, modelID, attempts=1):
98
  {"role": "user", "content": prompt},
99
  ]
100
  try:
101
- response = client.chat.completions.create(messages=chat, temperature=1, max_tokens=2048, top_p=1, stream=False, stop=None, model=modelID)
102
  except Exception as e:
103
  print(f"An error occurred: {e}")
104
  if attempts < 3:
 
91
 
92
 
93
  def getPrompt(prompt, modelID, attempts=1):
94
+ response = {}
95
  if modelID != magic_prompt_model:
96
  chat = [
97
  {"role": "user", "content": prompt_base},
 
99
  {"role": "user", "content": prompt},
100
  ]
101
  try:
102
+ response = groqClient.chat.completions.create(messages=chat, temperature=1, max_tokens=2048, top_p=1, stream=False, stop=None, model=modelID)
103
  except Exception as e:
104
  print(f"An error occurred: {e}")
105
  if attempts < 3: