Skip to content

Commit

Permalink
Update provider types
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Dec 17, 2024
1 parent 826ef8d commit fa5b2a5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
8 changes: 0 additions & 8 deletions chatlas/types/anthropic/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,4 @@ class ChatClientArgs(TypedDict, total=False):
default_headers: Optional[Mapping[str, str]]
default_query: Optional[Mapping[str, object]]
http_client: httpx.AsyncClient
transport: httpx.AsyncBaseTransport
proxies: Union[
str,
httpx.Proxy,
dict[str | httpx.URL, Union[None, str, httpx.URL, httpx.Proxy]],
None,
]
connection_pool_limits: httpx.Limits
_strict_response_validation: bool
3 changes: 1 addition & 2 deletions chatlas/types/anthropic/_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import Iterable, Literal, Mapping, Optional, TypedDict, Union

import anthropic
import anthropic._types
import anthropic.types.message_param
import anthropic.types.text_block_param
import anthropic.types.tool_choice_any_param
Expand Down Expand Up @@ -51,7 +50,7 @@ class SubmitInputArgs(TypedDict, total=False):
tools: Union[Iterable[anthropic.types.tool_param.ToolParam], anthropic.NotGiven]
top_k: int | anthropic.NotGiven
top_p: float | anthropic.NotGiven
extra_headers: Optional[Mapping[str, Union[str, anthropic._types.Omit]]]
extra_headers: Optional[Mapping[str, Union[str, anthropic.Omit]]]
extra_query: Optional[Mapping[str, object]]
extra_body: object | None
timeout: float | anthropic.Timeout | None | anthropic.NotGiven
1 change: 1 addition & 0 deletions chatlas/types/openai/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ChatClientArgs(TypedDict, total=False):
organization: str | None
project: str | None
base_url: str | httpx.URL | None
websocket_base_url: str | httpx.URL | None
timeout: Union[float, openai.Timeout, None, openai.NotGiven]
max_retries: int
default_headers: Optional[Mapping[str, str]]
Expand Down
1 change: 1 addition & 0 deletions chatlas/types/openai/_client_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ChatAzureClientArgs(TypedDict, total=False):
organization: str | None
project: str | None
base_url: str | None
websocket_base_url: str | httpx.URL | None
timeout: float | openai.Timeout | None | openai.NotGiven
max_retries: int
default_headers: Optional[Mapping[str, str]]
Expand Down
10 changes: 8 additions & 2 deletions chatlas/types/openai/_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import openai
import openai.types.chat.chat_completion_assistant_message_param
import openai.types.chat.chat_completion_audio_param
import openai.types.chat.chat_completion_developer_message_param
import openai.types.chat.chat_completion_function_call_option_param
import openai.types.chat.chat_completion_function_message_param
import openai.types.chat.chat_completion_named_tool_choice_param
Expand All @@ -26,6 +27,7 @@
class SubmitInputArgs(TypedDict, total=False):
messages: Iterable[
Union[
openai.types.chat.chat_completion_developer_message_param.ChatCompletionDeveloperMessageParam,
openai.types.chat.chat_completion_system_message_param.ChatCompletionSystemMessageParam,
openai.types.chat.chat_completion_user_message_param.ChatCompletionUserMessageParam,
openai.types.chat.chat_completion_assistant_message_param.ChatCompletionAssistantMessageParam,
Expand All @@ -36,6 +38,8 @@ class SubmitInputArgs(TypedDict, total=False):
model: Union[
str,
Literal[
"o1",
"o1-2024-12-17",
"o1-preview",
"o1-preview-2024-09-12",
"o1-mini",
Expand All @@ -44,10 +48,11 @@ class SubmitInputArgs(TypedDict, total=False):
"gpt-4o-2024-11-20",
"gpt-4o-2024-08-06",
"gpt-4o-2024-05-13",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-audio-preview",
"gpt-4o-audio-preview-2024-10-01",
"gpt-4o-audio-preview-2024-12-17",
"gpt-4o-mini-audio-preview",
"gpt-4o-mini-audio-preview-2024-12-17",
"chatgpt-4o-latest",
"gpt-4o-mini",
"gpt-4o-mini-2024-07-18",
Expand Down Expand Up @@ -100,6 +105,7 @@ class SubmitInputArgs(TypedDict, total=False):
openai.NotGiven,
]
presence_penalty: Union[float, None, openai.NotGiven]
reasoning_effort: Union[Literal["low", "medium", "high"], openai.NotGiven]
response_format: Union[
openai.types.shared_params.response_format_text.ResponseFormatText,
openai.types.shared_params.response_format_json_object.ResponseFormatJSONObject,
Expand Down

0 comments on commit fa5b2a5

Please sign in to comment.