cleaned up .env to move Azure config to separate azure.yaml file

updated README.md to explain new config
added Azure yaml loader to config class
centralized model retrieval into config class
this commit effectively combines and replaces #700 and #580
This commit is contained in:
Peter Edwards
2023-04-12 11:27:37 +02:00
parent 17b037faf7
commit 650e2dcd6d
7 changed files with 66 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ def create_chat_completion(messages, model=None, temperature=None, max_tokens=No
"""Create a chat completion using the OpenAI API"""
if cfg.use_azure:
response = openai.ChatCompletion.create(
deployment_id=cfg.openai_deployment_id,
deployment_id=cfg.get_azure_deployment_id_for_model(model),
model=model,
messages=messages,
temperature=temperature,