|
@@ -29,6 +29,9 @@ class SiliconflowLargeLanguageModel(OAIAPICompatLargeLanguageModel):
|
|
|
user: Optional[str] = None,
|
|
|
) -> Union[LLMResult, Generator]:
|
|
|
self._add_custom_parameters(credentials)
|
|
|
+ # {"response_format": "json_object"} need convert to {"response_format": {"type": "json_object"}}
|
|
|
+ if "response_format" in model_parameters:
|
|
|
+ model_parameters["response_format"] = {"type": model_parameters.get("response_format")}
|
|
|
return super()._invoke(model, credentials, prompt_messages, model_parameters, tools, stop, stream)
|
|
|
|
|
|
def validate_credentials(self, model: str, credentials: dict) -> None:
|