wip parametrize model name
This commit is contained in:
@@ -90,7 +90,7 @@ def send_push_notification(filename: str, email: str, sub: str):
|
||||
logger.debug("Querying transcription …")
|
||||
with open(temp_file_path, "rb") as audio_file:
|
||||
transcription = openai_client.audio.transcriptions.create(
|
||||
model="whisper-1", file=audio_file
|
||||
model=settings.openai_asr_model, file=audio_file
|
||||
)
|
||||
|
||||
transcription = transcription.text
|
||||
@@ -99,7 +99,7 @@ def send_push_notification(filename: str, email: str, sub: str):
|
||||
|
||||
instructions = get_instructions(transcription)
|
||||
summary_response = openai_client.chat.completions.create(
|
||||
model="gpt-4o", messages=instructions
|
||||
model=settings.openai_llm_model, messages=instructions
|
||||
)
|
||||
|
||||
summary = summary_response.choices[0].message.content
|
||||
|
||||
@@ -28,6 +28,8 @@ class Settings(BaseSettings):
|
||||
# AI-related settings
|
||||
openai_api_key: str
|
||||
openai_base_url: str = "https://api.openai.com/v1"
|
||||
openai_asr_model: str = "whisper-1"
|
||||
openai_llm_model: str = "gpt-4o"
|
||||
|
||||
# Webhook-related settings
|
||||
webhook_max_retries: int = 2
|
||||
|
||||
Reference in New Issue
Block a user