Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,13 +65,13 @@ def respond(message, history, model, access_level):
|
|
| 65 |
try:
|
| 66 |
# Call the chat completion method with the correct format
|
| 67 |
response_message = client.chat_completion(
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
response = response_message['choices'][0]['text'] # Access the content directly
|
| 76 |
except Exception as e:
|
| 77 |
return f"Error during model inference: {str(e)}", history
|
|
|
|
| 65 |
try:
|
| 66 |
# Call the chat completion method with the correct format
|
| 67 |
response_message = client.chat_completion(
|
| 68 |
+
model=model,
|
| 69 |
+
inputs=full_message, # Use the concatenated string
|
| 70 |
+
max_tokens=512,
|
| 71 |
+
temperature=0.7,
|
| 72 |
+
top_p=0.95,
|
| 73 |
+
stream=False # Disable streaming
|
| 74 |
+
)
|
| 75 |
response = response_message['choices'][0]['text'] # Access the content directly
|
| 76 |
except Exception as e:
|
| 77 |
return f"Error during model inference: {str(e)}", history
|