Skip to content

memory.py does not seem to handle any other llm than openai #296

@axlesor

Description

@axlesor

I used Gemini as llm by running cli.main and always got:
NotFoundError: Error code: 404
[NOTE] During task with name 'Bull Researcher'

Just checking code I believe the issue is in file: agents/utils/memory.py assumes backend llm is openapi and Gemini
does not understand "text-embedding-3-small"
As much as I follow Gemini uses self.embedding = "text-embedding-004:embedContent"
but on a different endpoint, hence changes are not that simple and Gemini suggested:
Summary of Changes Required
Change Endpoint: Switch from /v1/embeddings to /v1beta/models/text-embedding-004:embedContent.
Change Model: Use text-embedding-004 instead of text-embedding-3-small.
Update Payload: Change {"input": "..."} to {"content": {"parts": [{"text": "..."}]}}.

I guess I can get openai APi key to pass this issue now.

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