Bläddra i källkod

fix: "Model schema not found" error only in agents (#12655) (#12760)

tags/0.15.3
jiandanfeng 9 månader sedan
förälder
incheckning
edc29780ed
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      api/core/app/apps/agent_chat/app_runner.py

+ 1
- 1
api/core/app/apps/agent_chat/app_runner.py Visa fil

@@ -202,7 +202,7 @@ class AgentChatAppRunner(AppRunner):
# change function call strategy based on LLM model
llm_model = cast(LargeLanguageModel, model_instance.model_type_instance)
model_schema = llm_model.get_model_schema(model_instance.model, model_instance.credentials)
if not model_schema or not model_schema.features:
if not model_schema:
raise ValueError("Model schema not found")

if {ModelFeature.MULTI_TOOL_CALL, ModelFeature.TOOL_CALL}.intersection(model_schema.features or []):

Laddar…
Avbryt
Spara