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

Use agent_state = client.agents.create() return: letta_client.core.api_error.ApiError: status_code: 502, body: #2409

Open
2 tasks
nj-guiqi opened this issue Feb 3, 2025 · 0 comments

Comments

@nj-guiqi
Copy link

nj-guiqi commented Feb 3, 2025

Describe the bug
A clear and concise description of what the bug is.

Please describe your setup

  • How did you install letta?
    • pip install letta-client
  • Describe your setup
    • window docker run letta server
    • vscode python code

Screenshots

Image

code:

# install letta_client with `pip install letta-client`
from letta_client import Letta

# create a client to connect to your local Letta Server
client = Letta(
  base_url="http://localhost:8283"
)

# create an agent with two basic self-editing memory blocks
agent_state = client.agents.create(
    memory_blocks=[
        {
          "label": "human",
          "value": "The human's name is Bob the Builder."
        },
        {
          "label": "persona",
          "value": "My name is Sam, the all-knowing sentient AI."
        }
    ],
    model="openai/gpt-4o-mini",
    context_window_limit=16000,
    embedding="openai/text-embedding-3-small"
)

# the AgentState object contains all the information about the agent
print(agent_state)

I use the request and curl, it works. It seem like something wrong with httpx.client:

Image

it returns 502

Additional context
I use the Requests,it works

Image

I use the Postman, it works:

Image

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

No branches or pull requests

1 participant