a100 kh commited on
Commit
4f21439
1 Parent(s): b8c3f0e
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -5,7 +5,7 @@ from openai import OpenAI
5
  # Modify OpenAI's API key and API base to use vLLM's API server.
6
  openai_api_key = "12345"
7
  openai_api_base = "https://a502-131-112-63-87.ngrok-free.app/v1"
8
-
9
  """
10
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
11
  """
@@ -36,8 +36,9 @@ def respond(
36
 
37
  response = ""
38
 
39
- for message in client.chat_completion(
40
- messages,
 
41
  max_tokens=max_tokens,
42
  stream=True,
43
  temperature=temperature,
 
5
  # Modify OpenAI's API key and API base to use vLLM's API server.
6
  openai_api_key = "12345"
7
  openai_api_base = "https://a502-131-112-63-87.ngrok-free.app/v1"
8
+ model_name = "cyberagent/calm3-22b-chat"
9
  """
10
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
11
  """
 
36
 
37
  response = ""
38
 
39
+ for message in client.chat.completions.create(
40
+ model_name=model_name,
41
+ messages=messages,
42
  max_tokens=max_tokens,
43
  stream=True,
44
  temperature=temperature,