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

fix: embedding search for non-openai models #660

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

cygaar
Copy link
Collaborator

@cygaar cygaar commented Nov 28, 2024

Relates to:

Embedding search was broken when not using OpenAI models because our default zero embeddings are length 1536 (which is the length generated from remote embedding processing), but our locally generated embeddings are of length 384.

Risks

Low

Background

What does this PR do?

Fixes the embedding mismatch issue by generating a zero embedding vector based on the given model being used.

What kind of change is this?

Bug fix

Documentation changes needed?

My changes require a change to the project documentation.

Testing

Where should a reviewer start?

Run locally against OpenAI model and non-openai models

Detailed testing steps

Copy link
Member

@lalalune lalalune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great

@lalalune lalalune merged commit 0e8cb04 into elizaOS:main Nov 29, 2024
2 checks passed
@cygaar cygaar deleted the fix_embedding_mismatch branch November 29, 2024 13:45
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.

2 participants