File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
apps/setting/models_provider/impl
openai_model_provider/model Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ def _stream(
104104 if generation_chunk .message .usage_metadata is not None :
105105 self .usage_metadata = generation_chunk .message .usage_metadata
106106 # custom code
107- if chunk ['choices' ][0 ]['delta' ][ 'reasoning_content ' ]:
107+ if 'reasoning_content' in chunk ['choices' ][0 ]['delta' ]:
108108 generation_chunk .message .additional_kwargs ["reasoning_content" ] = chunk ['choices' ][0 ]['delta' ]['reasoning_content' ]
109109
110110 default_chunk_class = generation_chunk .message .__class__
Original file line number Diff line number Diff line change 1313
1414from common .config .tokenizer_manage_config import TokenizerManage
1515from setting .models_provider .base_model_provider import MaxKBBaseModel
16+ from setting .models_provider .impl .base_chat_open_ai import BaseChatOpenAI
1617
1718
1819def custom_get_token_ids (text : str ):
1920 tokenizer = TokenizerManage .get_tokenizer ()
2021 return tokenizer .encode (text )
2122
2223
23- class OpenAIChatModel (MaxKBBaseModel , ChatOpenAI ):
24+ class OpenAIChatModel (MaxKBBaseModel , BaseChatOpenAI ):
2425
2526 @staticmethod
2627 def is_cache_model ():
You can’t perform that action at this time.
0 commit comments