mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
stash changes
This commit is contained in:
parent
bbee3b7ecd
commit
d4e6bef7de
2 changed files with 9 additions and 8 deletions
|
|
@ -955,9 +955,8 @@ class CustomStreamWrapper:
|
||||||
if reasoning_content:
|
if reasoning_content:
|
||||||
if self.sent_first_thinking_block is False:
|
if self.sent_first_thinking_block is False:
|
||||||
self.thinking_content += (
|
self.thinking_content += (
|
||||||
(model_response.choices[0].delta.content or "")
|
model_response.choices[0].delta.content or ""
|
||||||
+ f"<thinking>{model_response.choices[0].delta.reasoning_content}"
|
) + f"{model_response.choices[0].delta.reasoning_content}"
|
||||||
)
|
|
||||||
self.sent_first_thinking_block = True
|
self.sent_first_thinking_block = True
|
||||||
return None
|
return None
|
||||||
elif (
|
elif (
|
||||||
|
|
@ -974,7 +973,7 @@ class CustomStreamWrapper:
|
||||||
and not self.sent_last_thinking_block
|
and not self.sent_last_thinking_block
|
||||||
and model_response.choices[0].delta.content
|
and model_response.choices[0].delta.content
|
||||||
):
|
):
|
||||||
self.thinking_content += "</thinking>"
|
self.thinking_content += ""
|
||||||
model_response.choices[0].delta.content = self.thinking_content
|
model_response.choices[0].delta.content = self.thinking_content
|
||||||
self.sent_last_thinking_block = True
|
self.sent_last_thinking_block = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
model_list:
|
model_list:
|
||||||
- model_name: fake-openai-endpoint
|
- model_name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
litellm_params:
|
litellm_params:
|
||||||
model: openai/my-fake-model
|
model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0
|
||||||
api_key: my-fake-key
|
thinking: {"type": "enabled", "budget_tokens": 1024}
|
||||||
api_base: https://exampleopenaiendpoint-production.up.railway.app/
|
max_tokens: 1080
|
||||||
|
|
||||||
|
|
||||||
general_settings:
|
general_settings:
|
||||||
store_model_in_db: true
|
store_model_in_db: true
|
||||||
store_prompts_in_spend_logs: true
|
store_prompts_in_spend_logs: true
|
||||||
|
|
||||||
|
litellm_settings:
|
||||||
|
merge_reasoning_content_in_choices: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue