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

llama-index-embeddings-vertex #11528

Closed
wants to merge 1 commit into from
Closed

Conversation

skvrd
Copy link
Contributor

@skvrd skvrd commented Mar 1, 2024

Description

Adding support for vertex ai embeddings

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

tested locally that vertex embeddings actually work.

Added simplest test

  • Added new unit/integration tests
  • I stared at the code and made sure it makes sense

Checklist:

  • I have performed a self-review of my own code
  • I ran make format; make lint to appease the lint gods
  • Created script locally to validate that package actually works

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 1, 2024
def _get_text_embeddings(self, texts: List[str]) -> List[List[float]]:
"""Get text embeddings."""
embeddings_list: List[List[float]] = []
for text in texts:
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a sequential operation, is there no batch operation available here?

"""Get text embedding."""
return self.get_general_text_embedding(text)

async def _aget_text_embedding(self, text: str) -> List[float]:
Copy link
Contributor

Choose a reason for hiding this comment

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

vertexai don't have async client to get embeddings?

@skvrd skvrd closed this Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants