Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -124,12 +124,12 @@ def predict(user_input,company):
|
|
124 |
# Get response from the LLM
|
125 |
try:
|
126 |
response = client.chat.completions.create(
|
127 |
-
model=
|
128 |
messages=prompt,
|
129 |
temperature=0
|
130 |
)
|
131 |
print("responseRavi",response)
|
132 |
-
prediction = response
|
133 |
except Exception as e:
|
134 |
prediction = f'Sorry, I encountered the following error: \n {e}'
|
135 |
|
|
|
124 |
# Get response from the LLM
|
125 |
try:
|
126 |
response = client.chat.completions.create(
|
127 |
+
model=embedding_model_name,
|
128 |
messages=prompt,
|
129 |
temperature=0
|
130 |
)
|
131 |
print("responseRavi",response)
|
132 |
+
prediction = response.choices[0].message.content.strip()
|
133 |
except Exception as e:
|
134 |
prediction = f'Sorry, I encountered the following error: \n {e}'
|
135 |
|