Skip to content

Commit 6a5c26c

Browse files
committed
refactor: models
1 parent 62d3b2e commit 6a5c26c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

server/agent/llm/clients/deepseek.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ def get_tools(self, tools: List[Any]):
4545
return [convert_to_openai_tool(tool) for tool in tools]
4646

4747
def parse_content(self, content: List[MessageContent]):
48-
print(f"parse_conent, content={content}")
49-
return content
48+
return [c.model_dump() for c in content]

server/agent/llm/clients/gemini.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def parse_gemini_input(message: MessageContent):
1717
return ImageRawURLContentBlock(
1818
image_url=message.image_url.url, type="image_url"
1919
)
20+
case "text":
21+
return message.model_dump()
2022
case _:
2123
return message
2224

@@ -51,6 +53,4 @@ def get_tools(self, tools: List[Any]):
5153
return [convert_to_genai_function_declarations(tool) for tool in tools]
5254

5355
def parse_content(self, content: List[MessageContent]):
54-
result = [parse_gemini_input(message=message) for message in content]
55-
print(f"parse_content, content={content}, result={result}")
56-
return result
56+
return [parse_gemini_input(message=message) for message in content]

server/agent/llm/clients/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ def get_tools(self, tools: List[Any]):
4242
return [convert_to_openai_tool(tool) for tool in tools]
4343

4444
def parse_content(self, content: List[MessageContent]):
45-
return content
45+
return [c.model_dump() for c in content]

0 commit comments

Comments
 (0)