Skip to content

Commit

Permalink
Changed model id in openai gpt3 and removed cache
Browse files Browse the repository at this point in the history
  • Loading branch information
singhalkarun authored Oct 10, 2023
1 parent 7fdad54 commit 89bb4d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
},
"nginx": [],
"constraints": ["node.labels.node_vm_type==gpu"],
"build": false
"build": true
}
]
}
3 changes: 1 addition & 2 deletions src/llm/openai/chatgpt3/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ def __new__(cls, context):
cls.instance = super(Model, cls).__new__(cls)
return cls.instance

@AsyncTTL(time_to_live=600000, maxsize=1024)
@retry(wait=wait_random_exponential(min=1, max=20), stop=stop_after_attempt(6))
async def inference(self, request: ModelRequest):
response = await openai_async.chat_complete(
openai.api_key,
timeout=20000,
payload={
"model": "gpt-3.5-turbo-0301",
"model": "gpt-3.5-turbo-0613",
"temperature": 0,
"messages": request.prompt,
},
Expand Down

0 comments on commit 89bb4d8

Please sign in to comment.