chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Feature Request]:

Open cisnez opened this issue 8 months ago • 1 comments

Describe the problem

Trying to use ChromaDB with the OpenAI API using xAI's grok model. However, I'm getting an error saying base_url is an unexpected keyword argument. Was hoping it would work.

TypeError: __init__() got an unexpected keyword argument 'base_url'

Here's my code.

base_url="https://api.x.ai/v1"
model_name = "grok-2-latest"

xai_client = OpenAI(
    api_key=os.getenv("XAI_API_KEY"),
    base_url=base_url,
)

embedding_function = OpenAIEmbeddingFunction(
   model_name=model_name,
   api_key=os.getenv("XAI_API_KEY"),
   base_url=base_url
 )

Describe the proposed solution

Can we please get a base_url added to OpenAIEmbeddingFunction?

Alternatives considered

Not seeing any other solution for to use xAI's grok model.

Importance

i cannot use Chroma without it

Additional Information

No response

cisnez avatar Jan 31 '25 03:01 cisnez