Skip to content

fix: embedding search for non-openai models#660

Merged
lalalune merged 2 commits into
elizaOS:mainfrom
cygaar:fix_embedding_mismatch
Nov 29, 2024
Merged

fix: embedding search for non-openai models#660
lalalune merged 2 commits into
elizaOS:mainfrom
cygaar:fix_embedding_mismatch

Conversation

@cygaar
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
@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