File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 4949from strands .models .bedrock import BedrockModel
5050from strands .models .openai import OpenAIModel
5151from strands_sglang import SGLangClient , SGLangModel
52+ from strands_sglang .tool_parser import HermesToolCallParser , ToolCallParser
5253from transformers import PreTrainedTokenizerBase
5354
5455#: Factory that produces a fresh `Model` per step (for concurrent step isolation).
@@ -66,6 +67,7 @@ def sglang_model_factory(
6667 model_id : str ,
6768 tokenizer : PreTrainedTokenizerBase ,
6869 client : SGLangClient ,
70+ tool_call_parser : ToolCallParser = HermesToolCallParser (),
6971 sampling_params : dict [str , Any ] = DEFAULT_SAMPLING_PARAMS ,
7072 enable_thinking : bool | None = None ,
7173) -> ModelFactory :
@@ -81,6 +83,7 @@ def sglang_model_factory(
8183 return lambda : SGLangModel (
8284 tokenizer = tokenizer ,
8385 client = client ,
86+ tool_call_parser = tool_call_parser ,
8487 params = sampling_params ,
8588 model_id = model_id ,
8689 return_logprobs = True ,
You can’t perform that action at this time.
0 commit comments