Skip to content

Commit

Permalink
update to remove extra call to completions api
Browse files Browse the repository at this point in the history
  • Loading branch information
wotey committed Aug 6, 2024
1 parent 6f8d042 commit bc906b9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/backend/approaches/chatreadretrieveread.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,6 @@ async def run(self, history: Sequence[dict[str, str]], overrides: dict[str, Any]
#print("System Message Tokens: ", self.num_tokens_from_string(system_message, "cl100k_base"))
#print("Few Shot Tokens: ", self.num_tokens_from_string(self.response_prompt_few_shots[0]['content'], "cl100k_base"))
#print("Message Tokens: ", self.num_tokens_from_string(message_string, "cl100k_base"))
chat_completion= await self.client.chat.completions.create(
model=self.chatgpt_deployment,
messages=messages,
temperature=float(overrides.get("response_temp")) or 0.6,
n=1,
stream=True
)

elif self.model_name.startswith("gpt-4"):
messages = self.get_messages_from_history(
Expand Down

0 comments on commit bc906b9

Please sign in to comment.