diff --git a/sdks/python/julep/api/client.py b/sdks/python/julep/api/client.py index 013b3e3e4..1298f4770 100644 --- a/sdks/python/julep/api/client.py +++ b/sdks/python/julep/api/client.py @@ -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( @@ -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( diff --git a/sdks/python/julep/api/types/chat_settings.py b/sdks/python/julep/api/types/chat_settings.py index 086c5a74d..ebaa5b991 100644 --- a/sdks/python/julep/api/types/chat_settings.py +++ b/sdks/python/julep/api/types/chat_settings.py @@ -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( diff --git a/sdks/python/julep/managers/agent.py b/sdks/python/julep/managers/agent.py index 594030c37..9ab27bea9 100644 --- a/sdks/python/julep/managers/agent.py +++ b/sdks/python/julep/managers/agent.py @@ -588,7 +588,7 @@ async def get(self, id: Union[UUID, str]) -> Agent: return await self._get(id=id) @beartype - @rewrap_in_class(Agent) + # @rewrap_in_class(Agent) async def create(self, **kwargs: AgentCreateArgs) -> Agent: """ Create a new resource asynchronously with specified details. @@ -662,7 +662,7 @@ async def delete(self, agent_id: Union[str, UUID]): return await self._delete(agent_id=agent_id) @beartype - @rewrap_in_class(Agent) + # @rewrap_in_class(Agent) async def update( self, *, agent_id: Union[str, UUID], **kwargs: AgentUpdateArgs ) -> Agent: diff --git a/sdks/python/julep/managers/doc.py b/sdks/python/julep/managers/doc.py index ba6ca08bb..abfa6c7d0 100644 --- a/sdks/python/julep/managers/doc.py +++ b/sdks/python/julep/managers/doc.py @@ -416,7 +416,7 @@ async def list( ).items @beartype - @rewrap_in_class(Doc) + # @rewrap_in_class(Doc) async def create(self, **kwargs: DocsCreateArgs) -> Doc: """ Create a new resource asynchronously. diff --git a/sdks/python/julep/managers/session.py b/sdks/python/julep/managers/session.py index 583a7c243..9d7dc9f81 100644 --- a/sdks/python/julep/managers/session.py +++ b/sdks/python/julep/managers/session.py @@ -843,7 +843,7 @@ async def get(self, id: Union[UUID, str]) -> Session: return await self._get(id=id) @beartype - @rewrap_in_class(Session) + # @rewrap_in_class(Session) async def create(self, **kwargs: SessionCreateArgs) -> Session: """ Asynchronously create a resource with the specified user and agent identifiers. @@ -915,7 +915,7 @@ async def delete(self, session_id: Union[str, UUID]): return await self._delete(session_id=session_id) @beartype - @rewrap_in_class(Session) + # @rewrap_in_class(Session) async def update( self, **kwargs: SessionUpdateArgs, diff --git a/sdks/python/julep/managers/user.py b/sdks/python/julep/managers/user.py index 0dda07276..ea86581b7 100644 --- a/sdks/python/julep/managers/user.py +++ b/sdks/python/julep/managers/user.py @@ -400,7 +400,7 @@ async def get(self, id: Union[UUID, str]) -> User: return await self._get(id=id) @beartype - @rewrap_in_class(User) + # @rewrap_in_class(User) async def create(self, **kwargs: UserCreateArgs) -> User: """ Asynchronously create a new resource with the provided name, description, and documents. @@ -484,7 +484,7 @@ async def delete( ) @beartype - @rewrap_in_class(User) + # @rewrap_in_class(User) async def update( self, *, user_id: Union[str, UUID], **kwargs: UserUpdateArgs ) -> User: diff --git a/sdks/python/julep/managers/utils.py b/sdks/python/julep/managers/utils.py index 346855e99..529acaa50 100644 --- a/sdks/python/julep/managers/utils.py +++ b/sdks/python/julep/managers/utils.py @@ -39,7 +39,6 @@ async def async_wrapper(*args, **kwargs): return cls.construct(**kwargs, **result.dict()) def sync_wrapper(*args, **kwargs): - print(kwargs) # Add this line to debug result = func(*args, **kwargs) return cls.construct(**kwargs, **result.dict())