mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
fix: bad ability name in preproc check
This commit is contained in:
@@ -34,7 +34,6 @@ class PreProcessor(stage.PipelineStage):
|
||||
|
||||
session = await self.ap.sess_mgr.get_session(query)
|
||||
|
||||
|
||||
# 非 local-agent 时,llm_model 为 None
|
||||
llm_model = (
|
||||
await self.ap.model_mgr.get_model_by_uuid(query.pipeline_config['ai']['local-agent']['model'])
|
||||
@@ -59,7 +58,7 @@ class PreProcessor(stage.PipelineStage):
|
||||
|
||||
if selected_runner == 'local-agent':
|
||||
query.use_funcs = (
|
||||
conversation.use_funcs if query.use_llm_model.model_entity.abilities.__contains__('tool_call') else None
|
||||
conversation.use_funcs if query.use_llm_model.model_entity.abilities.__contains__('func_call') else None
|
||||
)
|
||||
|
||||
query.variables = {
|
||||
@@ -82,7 +81,7 @@ class PreProcessor(stage.PipelineStage):
|
||||
content_list = []
|
||||
|
||||
plain_text = ''
|
||||
qoute_msg = query.pipeline_config["trigger"].get("misc",'').get("combine-quote-message")
|
||||
qoute_msg = query.pipeline_config['trigger'].get('misc', '').get('combine-quote-message')
|
||||
|
||||
for me in query.message_chain:
|
||||
if isinstance(me, platform_message.Plain):
|
||||
@@ -100,13 +99,11 @@ class PreProcessor(stage.PipelineStage):
|
||||
content_list.append(llm_entities.ContentElement.from_text(msg.text))
|
||||
elif isinstance(msg, platform_message.Image):
|
||||
if selected_runner != 'local-agent' or query.use_llm_model.model_entity.abilities.__contains__(
|
||||
'vision'
|
||||
'vision'
|
||||
):
|
||||
if msg.base64 is not None:
|
||||
content_list.append(llm_entities.ContentElement.from_image_base64(msg.base64))
|
||||
|
||||
|
||||
|
||||
query.variables['user_message_text'] = plain_text
|
||||
|
||||
query.user_message = llm_entities.Message(role='user', content=content_list)
|
||||
|
||||
Reference in New Issue
Block a user