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.
api_type
AnyLLMConfig
1 parent 629b8a8 commit c545e43Copy full SHA for c545e43
any_llm_client/main.py
@@ -1,14 +1,16 @@
1
import functools
2
import typing
3
4
+import pydantic
5
+
6
from any_llm_client.clients.mock import MockLLMClient, MockLLMConfig
7
from any_llm_client.clients.openai import OpenAIClient, OpenAIConfig
8
from any_llm_client.clients.yandexgpt import YandexGPTClient, YandexGPTConfig
9
from any_llm_client.core import LLMClient
10
from any_llm_client.retry import RequestRetryConfig
11
12
-AnyLLMConfig = YandexGPTConfig | OpenAIConfig | MockLLMConfig
13
+AnyLLMConfig = typing.Annotated[YandexGPTConfig | OpenAIConfig | MockLLMConfig, pydantic.Discriminator("api_type")]
14
15
16
if typing.TYPE_CHECKING:
0 commit comments