File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,5 +45,4 @@ def get_tools(self, tools: List[Any]):
45
45
return [convert_to_openai_tool (tool ) for tool in tools ]
46
46
47
47
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 ]
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ def parse_gemini_input(message: MessageContent):
17
17
return ImageRawURLContentBlock (
18
18
image_url = message .image_url .url , type = "image_url"
19
19
)
20
+ case "text" :
21
+ return message .model_dump ()
20
22
case _:
21
23
return message
22
24
@@ -51,6 +53,4 @@ def get_tools(self, tools: List[Any]):
51
53
return [convert_to_genai_function_declarations (tool ) for tool in tools ]
52
54
53
55
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 ]
Original file line number Diff line number Diff line change @@ -42,4 +42,4 @@ def get_tools(self, tools: List[Any]):
42
42
return [convert_to_openai_tool (tool ) for tool in tools ]
43
43
44
44
def parse_content (self , content : List [MessageContent ]):
45
- return content
45
+ return [ c . model_dump () for c in content ]
You can’t perform that action at this time.
0 commit comments