Skip to content

请求对 gemini embeddings 的支持 #44

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

Open
LjhAUMEM opened this issue Nov 18, 2024 · 2 comments
Open

请求对 gemini embeddings 的支持 #44

LjhAUMEM opened this issue Nov 18, 2024 · 2 comments

Comments

@LjhAUMEM
Copy link

使用的配置文件,目前无法使用text-embedding-004和embedding-001模型
相关官方文档 https://ai.google.dev/api/embeddings

providers:
  - provider: gemini
    base_url: https://generativelanguage.googleapis.com/v1beta
    api:
      - xxx
    model:
      - gemini-1.5-flash: gpt-4o-mini
      - gemini-1.5-flash
      - text-embedding-004
      - embedding-001
    tools: true
    preferences:
      api_key_rate_limit:
        gpt-4o-mini: 15/min
        gemini-1.5-flash: 15/min
        text-embedding-004: 1500/min
        embedding-001: 1500/min
      api_key_cooldown_period: 60
      api_key_schedule_algorithm: round_robin
      proxy: socks5://host.docker.internal:10808
api_keys:
  - api: xxx
    model:
      - all
@LjhAUMEM
Copy link
Author

LjhAUMEM commented Nov 18, 2024

看了一下代码,目前gemini engine仅支持chat,单独再开一个gemini-embed engine可能更容易一点,然后通过手动指定engine来使用

providers:
  - provider: gemini chat
    engine: gemini
    base_url: https://generativelanguage.googleapis.com/v1beta
    api:
      - xxx
    model:
      - gemini-1.5-flash: gpt-4o-mini
      - gemini-1.5-flash
    tools: true
    preferences:
      api_key_rate_limit:
        gpt-4o-mini: 15/min
        gemini-1.5-flash: 15/min
      api_key_cooldown_period: 60
      api_key_schedule_algorithm: round_robin
      proxy: socks5://host.docker.internal:10808
  - provider: gemini embeddings
    engine: gemini-embed
    base_url: https://generativelanguage.googleapis.com/v1beta
    api:
      - xxx
    model:
      - text-embedding-004
      - embedding-001
    preferences:
      api_key_rate_limit:
        text-embedding-004: 1500/min
        embedding-001: 1500/min
      api_key_cooldown_period: 60
      api_key_schedule_algorithm: round_robin
      proxy: socks5://host.docker.internal:10808
api_keys:
  - api: xxx
    model:
      - all

@yym68686
Copy link
Owner

嗯嗯,已列入开发计划。

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

No branches or pull requests

2 participants