We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7e2c01 commit d27c336Copy full SHA for d27c336
coagent/agents/util.py
@@ -1,13 +1,22 @@
1
import asyncio
2
import functools
3
-from typing import AsyncIterator
+from typing import AsyncIterator, Type
4
5
from coagent.core import logger
6
+from pydantic import BaseModel
7
8
from .messages import ChatMessage
9
from .model_client import default_model_client, ModelClient
10
11
12
+def type_to_response_format_param(
13
+ response_format: Type[BaseModel] | dict | None,
14
+) -> dict | None:
15
+ import litellm.utils
16
+
17
+ return litellm.utils.type_to_response_format_param(response_format)
18
19
20
async def chat(
21
messages: list[ChatMessage], client: ModelClient = default_model_client
22
) -> ChatMessage:
0 commit comments