AashitaK commited on
Commit
5927468
·
verified ·
1 Parent(s): cbd0cec

Update openai_api.py

Browse files
Files changed (1) hide show
  1. openai_api.py +2 -1
openai_api.py CHANGED
@@ -21,7 +21,8 @@ def get_embedding(text: str, model: str=EMBEDDING_MODEL) -> list[float]:
21
  return result.data[0].embedding
22
 
23
 
24
- def get_response(messages: list[dict], model: str=COMPLETIONS_MODEL) -> str:
 
25
  """Chat completion using OpenAI's GPT models."""
26
  response = client.chat.completions.create(
27
  model=model,
 
21
  return result.data[0].embedding
22
 
23
 
24
+ def get_response(messages: list[dict], model: str=COMPLETIONS_MODEL,
25
+ temperature=0, max_completion_tokens=800) -> str:
26
  """Chat completion using OpenAI's GPT models."""
27
  response = client.chat.completions.create(
28
  model=model,