Skip to content

The AssistantMemory model of the Python client does not match the model of the AssistantMemory on the server side, causing the client's create_assistant behavior to be unoperational. #58

Open
@hartefisher

Description

@hartefisher

Describe the bug
The AssistantMemory model on the Python client (0.3.0) from taskingai.client.models.entities.assistant_memory does not match the AssistantMemory model on the server side from backend.app.models.assistant.memory.assistant_memory, which causes the client's create_assistant action to fail, returning the error 'the max_messages field is required for the message_window memory type.'

To Reproduce
The code is as follows:

  taskingai.assistant.create_assistant(
    model_id=model_id,
    name="Customer Service Assistant",
    description="A professional assistant for customer service.",
    system_prompt_template=["You are a professional customer service assistant speaking {{language}}."],
    memory={"type": "message_window", 'max_messages': 10},
    tools=[],
    retrievals=[],
    retrieval_configs={
        "top_k": 3, 
        "max_tokens": 4096,
        "method": "user_message"
    },
    metadata={"foo": "bar"},
  )

Expected behavior
Successfully create an Assistant.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions