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

wip: New python client #491

Closed
wants to merge 12 commits into from
Closed

wip: New python client #491

wants to merge 12 commits into from

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Sep 8, 2024

Currently broken. Throws this:

>>> from julep import Julep
>>> api_key = "SOMETHING" ; base_url = "http://localhost/api"
>>> client = Julep(api_key=api_key, base_url=base_url)
>>> r = client.agents.list(limit=100, offset=0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/__init__.py", line 41, in wrapper
    response = fn(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/api/default/agents_route_list.py", line 109, in sync_detailed
    return _build_response(client=client, response=response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/api/default/agents_route_list.py", line 67, in _build_response
    parsed=_parse_response(client=client, response=response),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/api/default/agents_route_list.py", line 51, in _parse_response
    response_200 = RouteListResponse200.from_dict(response.json())
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/models/route_list_response_200.py", line 63, in from_dict
    items_item = Agent.from_dict(items_item_data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/models/agent.py", line 154, in from_dict
    default_settings = DefaultChatSettings.from_dict(_default_settings)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/diwank/github.com/julep-ai/julep/sdks/python/julep/sdk/models/default_chat_settings.py", line 94, in from_dict
    d = src_dict.copy()
        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'
  • refactor: Remove fern and fern-generated sdk
  • feat: Init new python sdk basic
  • feat: New python client

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
@creatorrr creatorrr changed the title f/new python client wip: N'ew python client Sep 8, 2024
@creatorrr creatorrr changed the title wip: N'ew python client wip: New python client Sep 8, 2024
@creatorrr creatorrr closed this Sep 16, 2024
@creatorrr creatorrr deleted the f/new-python-client branch September 16, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant