10 Commits

Author SHA1 Message Date
a-holm
350b0038ee fix(llm): improve message handling to support LLMs without content/tool_calls
This commit improves the message handling in the LLM class to gracefully handle
messages without 'content' or 'tool_calls' fields. Previously, the system would
raise a ValueError when encountering such messages, causing crashes when working
with models like Google's Gemini that sometimes return messages with different
structures.

Key changes:
- Reordered message processing to check for Message objects first
- Changed validation approach to silently skip malformed messages instead of crashing
- Removed the strict ValueError when content/tool_calls are missing

This change maintains compatibility with correctly formatted messages while
improving robustness when working with various LLM providers.
2025-03-14 21:01:13 +01:00
liangxinbing
9c7834eff2 update readme; format code; update config.example.toml 2025-03-14 12:20:59 +08:00
mannaandpoem
e844dfca34
Merge pull request #510 from the0807/feature/o3-mini
Support OpenAI Reasoning Models (o1, o3-mini)
2025-03-14 11:47:34 +08:00
Isaac
6b64b98b12
Merge branch 'main' into refactor/standardize-tool-choice-literals 2025-03-12 20:55:52 +08:00
liangxinbing
e6e31a2c13 update timeout to 300 2025-03-12 20:09:23 +08:00
Matt Eng
eac3a6e24e Standardize literals for role and tool choice type definitions 2025-03-12 00:15:31 -07:00
the0807
983e8f0d4b Support OpenAI Reasoning Models (o1, o3-mini) 2025-03-12 14:33:32 +09:00
liangxinbing
dc28e9187b adjust code format 2025-03-08 15:54:23 +08:00
Aria F
ecac3382ec
# feat: AzureOpenaiAPI support 2025-03-07 20:55:02 +08:00
liangxinbing
d028e64a98 init project 2025-03-06 22:57:07 +08:00