这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

resolves #405

@review-agent-prime
Copy link

server/utils/vectorDbProviders/chroma/index.js

Using the helper function to parse the authorization header in the Chroma client improves the security of the application. It ensures that the API key is included in the correct header and in the correct format.
Create Issue
See the diff
Checkout the fix

    // In server/utils/vectorDbProviders/chroma/index.js
    const client = new ChromaClient({
      path: process.env.CHROMA_ENDPOINT,
      ...(!!process.env.CHROMA_API_HEADER && !!process.env.CHROMA_API_KEY
        ? {
            fetchOptions: {
              headers: parseAuthHeader(
                process.env.CHROMA_API_HEADER || "X-Api-Key",
                process.env.CHROMA_API_KEY
              ),
            },
          }
        : {}),
    });
git fetch origin && git checkout -b ReviewBot/Impro-489z5ar origin/ReviewBot/Impro-489z5ar

@timothycarambat timothycarambat merged commit 6fa8b0c into master Dec 4, 2023
@timothycarambat timothycarambat deleted the 405-localai-authorization branch December 4, 2023 16:38
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
* Add API key option to LocalAI

* add api key for model dropdown selector
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.

LocalAI API Key needed

2 participants