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

Conversation

@gabrielkoo
Copy link
Contributor

@gabrielkoo gabrielkoo commented Mar 6, 2024

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

Resolves an error when Chroma is set up with an API key.

image

What is in this change?

Imports parseAuthHeader in server/utils/vectorDbProviders/chroma/index.js
so that Chroma.connect would no longer throw an error.

const client = new ChromaClient({
path: process.env.CHROMA_ENDPOINT, // if not set will fallback to localhost:8000
...(!!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
),
},
}
: {}),
});

Additional Information

Add any other context about the Pull Request here that was not captured above.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@timothycarambat
Copy link
Member

😮‍💨 Thank you @gabrielkoo . Ping in Discord for a contributor badge! Im in there under the same name

@timothycarambat timothycarambat merged commit 4731ec8 into Mintplex-Labs:master Mar 6, 2024
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
…bProviders/chroma/index.js` (Mintplex-Labs#869)

fix: import parseAuthHeader in chroma/index.js
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.

2 participants