BICORP commited on
Commit
2de9f3a
·
verified ·
1 Parent(s): 9c4ec9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- model=model,
69
- messages=full_message, # Use the correct parameter name
70
- max_tokens=512,
71
- temperature=0.7,
72
- top_p=0.95,
73
- stream=False
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