Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python-sdk): temporarily remove async types #196

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions sdks/python/julep/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def __init__(
self._client_wrapper = SyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
httpx_client=httpx.Client(timeout=timeout)
if httpx_client is None
else httpx_client,
httpx_client=(
httpx.Client(timeout=timeout) if httpx_client is None else httpx_client
),
)

def list_sessions(
Expand Down Expand Up @@ -1838,9 +1838,11 @@ def __init__(
self._client_wrapper = AsyncClientWrapper(
base_url=_get_base_url(base_url=base_url, environment=environment),
api_key=api_key,
httpx_client=httpx.AsyncClient(timeout=timeout)
if httpx_client is None
else httpx_client,
httpx_client=(
httpx.AsyncClient(timeout=timeout)
if httpx_client is None
else httpx_client
),
)

async def list_sessions(
Expand Down
14 changes: 7 additions & 7 deletions sdks/python/julep/api/types/chat_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class ChatSettings(pydantic.BaseModel):
length_penalty: typing.Optional[float] = pydantic.Field(
description="(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated."
)
logit_bias: typing.Optional[
typing.Dict[str, typing.Optional[int]]
] = pydantic.Field(
description=(
"Modify the likelihood of specified tokens appearing in the completion.\n"
"\n"
"Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n"
logit_bias: typing.Optional[typing.Dict[str, typing.Optional[int]]] = (
pydantic.Field(
description=(
"Modify the likelihood of specified tokens appearing in the completion.\n"
"\n"
"Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n"
)
)
)
max_tokens: typing.Optional[int] = pydantic.Field(
Expand Down
97 changes: 16 additions & 81 deletions sdks/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ typing-extensions = ">=4.0.0,<5.0.0"


[tool.poetry.group.dev.dependencies]
pytype = ">=2024.4.11"
pytype = "2024.1.5"
black = "^24.4.0"
ward = "^0.68.0b0"
ruff = "^0.1.13"
Expand Down
Loading