Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions oxygent/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class Config:
},
"vearch": {},
"es": {},
"es_schema": {"shared_data": {"type": "text"}, "group_data": {"type": "text"}},
"redis": {},
"redis_param": {
"expire_time": 86400, # 24 hours 60 * 60 * 24
Expand Down Expand Up @@ -390,15 +389,15 @@ def set_es_schema_shared_data(cls, es_schema_config):

@classmethod
def get_es_schema_shared_data(cls) -> dict:
return cls.get_module_config("es_schema", "shared_data")
return cls.get_module_config("es_schema", "shared_data", {"type": "text"})

@classmethod
def set_es_schema_group_data(cls, es_schema_config):
return cls.set_module_config("es_schema", "group_data", es_schema_config)

@classmethod
def get_es_schema_group_data(cls) -> dict:
return cls.get_module_config("es_schema", "group_data")
return cls.get_module_config("es_schema", "group_data", {"type": "text"})

""" vearch """

Expand Down
2 changes: 1 addition & 1 deletion oxygent/schemas/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ class LLMState(Enum):

class LLMResponse(BaseModel):
state: LLMState
output: Union[str, dict]
output: Union[str, dict, list]
ori_response: str = Field(default="")
2 changes: 1 addition & 1 deletion oxygent/schemas/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Message(BaseModel):
"""Represents a chat message in the conversation."""

role: Literal["system", "user", "assistant", "tool"] = Field(...)
content: Optional[Union[str, list]] = Field(default=None)
content: Optional[Union[str, list, dict]] = Field(default=None)
tool_calls: Optional[List[ToolCall]] = Field(default=None)
name: Optional[str] = Field(default=None)
tool_call_id: Optional[str] = Field(default=None)
Expand Down