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 api_base undefined bug in Gemini embeddings #11393

Merged
merged 21 commits into from
Feb 27, 2024

Conversation

BetterAndBetterII
Copy link
Contributor

@BetterAndBetterII BetterAndBetterII commented Feb 26, 2024

Description

api_base variable is used in init(), but isn't conveyed in augment

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Tested in my own project
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 26, 2024
@@ -18,6 +18,8 @@ class GeminiEmbedding(BaseEmbedding):
Defaults to "models/embedding-001".
api_key (Optional[str]): API key to access the model. Defaults to None.
api_base (Optional[str]): API base to access the model. Defaults to Official Base.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yea, the proper version does not have this issue actually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 27, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 27, 2024
@hatianzhang hatianzhang merged commit 27f7691 into run-llama:main Feb 27, 2024
8 checks passed
Dominastorm pushed a commit to uptrain-ai/llama_index that referenced this pull request Feb 28, 2024
* Support Gemini "transport" configuration

Added Gemini transportation method configuration support.

* Sync updates in multi_modal_llms\gemini

* Updated Dashscope qwen llm defaults

Setting qwen default num_outputs and temperature

* cr

* support gemini embedding configuration

support configuring api_base, api_key, transport method

* fix gptrepo data connector encoding issue

reading a file in default encoding(GBK) will cause error characters problem. Added encoding configuration

* sync latest repo

* sync latest repo

* cr

* cr

* Fix api_base undefined bug in Gemini embeddings

* add comments

* fix linter test

* sync fix in integrations/embeddings

* fix unit test

---------

Co-authored-by: Haotian Zhang <[email protected]>
anoopshrma pushed a commit to anoopshrma/llama_index that referenced this pull request Mar 2, 2024
* Support Gemini "transport" configuration

Added Gemini transportation method configuration support.

* Sync updates in multi_modal_llms\gemini

* Updated Dashscope qwen llm defaults

Setting qwen default num_outputs and temperature

* cr

* support gemini embedding configuration

support configuring api_base, api_key, transport method

* fix gptrepo data connector encoding issue

reading a file in default encoding(GBK) will cause error characters problem. Added encoding configuration

* sync latest repo

* sync latest repo

* cr

* cr

* Fix api_base undefined bug in Gemini embeddings

* add comments

* fix linter test

* sync fix in integrations/embeddings

* fix unit test

---------

Co-authored-by: Haotian Zhang <[email protected]>
Izukimat pushed a commit to Izukimat/llama_index that referenced this pull request Mar 29, 2024
* Support Gemini "transport" configuration

Added Gemini transportation method configuration support.

* Sync updates in multi_modal_llms\gemini

* Updated Dashscope qwen llm defaults

Setting qwen default num_outputs and temperature

* cr

* support gemini embedding configuration

support configuring api_base, api_key, transport method

* fix gptrepo data connector encoding issue

reading a file in default encoding(GBK) will cause error characters problem. Added encoding configuration

* sync latest repo

* sync latest repo

* cr

* cr

* Fix api_base undefined bug in Gemini embeddings

* add comments

* fix linter test

* sync fix in integrations/embeddings

* fix unit test

---------

Co-authored-by: Haotian Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants