Skip to content

Commit 5435b5b

Browse files
committed
Removed temperature and seed from OpenAI calls so that reasoning models are supported
1 parent a0ebe70 commit 5435b5b

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/containerapp/ai_ocr/chains.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ def get_structured_data(markdown_content: str, prompt: str, json_schema: str, im
217217
try:
218218
response = client.chat.completions.create(
219219
model=config["openai_model_deployment"],
220-
messages=messages,
221-
seed=0,
222-
temperature=0.1, # Lower temperature for more consistent output
223-
response_format={"type": "json_object"} if "gpt-4" in config["openai_model_deployment"].lower() else None
220+
messages=messages
224221
)
225222

226223
raw_content = response.choices[0].message.content

src/containerapp/api_routes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ async def chat_with_document(request: Request):
569569
model=config["openai_model_deployment"],
570570
messages=messages,
571571
max_tokens=1000,
572-
temperature=0.3,
573572
top_p=0.9
574573
)
575574

0 commit comments

Comments
 (0)