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

Add YandexGPT Encoder #1

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Add YandexGPT Encoder #1

merged 3 commits into from
Jun 18, 2024

Conversation

KirillKukharev
Copy link
Owner

@KirillKukharev KirillKukharev commented Jun 11, 2024

Pull Request Description:

This pull request adds a new encoder class, YandexGPTEncoder, for generating text embeddings using the YandexGPT API. The encoder integrates with the semantic_router.

Changes Introduced:

  1. New Encoder Class: YandexGPTEncoder for YandexGPT API integration.
  2. Initialization: Requires YandexGPT API key and catalog ID, which can be provided directly or via environment variables.
  3. Method Implementation:
    • _initialize_client for setting up the API client.
    • get_headers for preparing the request headers.
    • call for generating embeddings by making API requests.

@KirillKukharev KirillKukharev changed the title Add YandexGPT Encoder for Text Embeddings Add YandexGPT Encoder Jun 13, 2024

Attributes:
client: An instance of the TextEmbeddingModel client.
type: The type of the encoder, which is "yandex-gpt".
Copy link

Choose a reason for hiding this comment

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

I suppose it should be yandexgpt instead of yandex-gpt

@Alkons
Copy link

Alkons commented Jun 17, 2024

lgtm

@KirillKukharev KirillKukharev merged commit 13faf65 into main Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants