diff --git a/pkg/command/operators/list.py b/pkg/command/operators/list.py index 258e0ee2..ff90d4dd 100644 --- a/pkg/command/operators/list.py +++ b/pkg/command/operators/list.py @@ -42,7 +42,7 @@ class ListOperator(operator.CommandOperator): using_conv_index = index if index >= page * record_per_page and index < (page + 1) * record_per_page: - content += f"{index} {time_str}: {conv.messages[0].content if len(conv.messages) > 0 else '无内容'}\n" + content += f"{index} {time_str}: {conv.messages[0].readable_str() if len(conv.messages) > 0 else '无内容'}\n" index += 1 if content == '': @@ -51,6 +51,6 @@ class ListOperator(operator.CommandOperator): if context.session.using_conversation is None: content += "\n当前处于新会话" else: - content += f"\n当前会话: {using_conv_index} {context.session.using_conversation.create_time.strftime('%Y-%m-%d %H:%M:%S')}: {context.session.using_conversation.messages[0].content if len(context.session.using_conversation.messages) > 0 else '无内容'}" + content += f"\n当前会话: {using_conv_index} {context.session.using_conversation.create_time.strftime('%Y-%m-%d %H:%M:%S')}: {context.session.using_conversation.messages[0].readable_str() if len(context.session.using_conversation.messages) > 0 else '无内容'}" yield entities.CommandReturn(text=f"第 {page + 1} 页 (时间倒序):\n{content}") diff --git a/pkg/pipeline/cntfilter/entities.py b/pkg/pipeline/cntfilter/entities.py index 83744c1d..af60a594 100644 --- a/pkg/pipeline/cntfilter/entities.py +++ b/pkg/pipeline/cntfilter/entities.py @@ -31,13 +31,6 @@ class EnableStage(enum.Enum): """后处理""" -class AcceptContent(enum.Enum): - """过滤器接受的内容模态""" - - TEXT = enum.auto() - - IMAGE_URL = enum.auto() - class FilterResult(pydantic.BaseModel): level: ResultLevel """结果等级 diff --git a/pkg/pipeline/cntfilter/filter.py b/pkg/pipeline/cntfilter/filter.py index 5fd55e42..8eceb877 100644 --- a/pkg/pipeline/cntfilter/filter.py +++ b/pkg/pipeline/cntfilter/filter.py @@ -57,16 +57,6 @@ class ContentFilter(metaclass=abc.ABCMeta): entities.EnableStage.PRE, entities.EnableStage.POST ] - - @property - def accept_content(self): - """本过滤器接受的模态 - - 默认仅接受纯文本 - """ - return [ - entities.AcceptContent.TEXT - ] async def initialize(self): """初始化过滤器 diff --git a/templates/provider.json b/templates/provider.json index dadec8ea..309fb827 100644 --- a/templates/provider.json +++ b/templates/provider.json @@ -1,6 +1,6 @@ { "enable-chat": true, - "enable-vision": false, + "enable-vision": true, "keys": { "openai": [ "sk-1234567890"