Skip to content

ChromaDB.Client.ChromaException: Unexpected status code: MethodNotAllowed. #79

@hannahhaken

Description

@hannahhaken

I have installed 1.0.0 of the SDK and this is the code I have implemented:

        var configOptions = new ChromaConfigurationOptions(uri: chromaUri);
        using var httpClient = new HttpClient();
        var chromaClient = new ChromaClient(configOptions, httpClient);
        
        var collection = await chromaClient.GetOrCreateCollection(collectionName);
        return new ChromaCollectionClient(collection, configOptions, httpClient);

When I run the code with a collection name against chromadb/chroma:1.0.3 running locally in Docker, I get the following error:

Unhandled exception. ChromaDB.Client.ChromaException: Unexpected status code: MethodNotAllowed.
   at ChromaDB.Client.Common.HttpClientHelpers.Send[TResponse](HttpClient httpClient, HttpRequestMessage httpRequestMessage)
   at ChromaDB.Client.Common.HttpClientHelpers.Post[TInput,TResponse](HttpClient httpClient, String endpoint, TInput input, RequestQueryParams queryParams)
   at ChromaDB.Client.ChromaClient.GetOrCreateCollection(String name, Dictionary`2 metadata, String tenant, String database)
   at ConsoleApp1.ChromeCollectionFactory.CreateAsync(String chromaUri, String collectionName) in /Users/hannahhaken/workarea/LLamaSharp/ConsoleApp1/ChromaConnector.cs:line 47
   at Program.<Main>$(String[] args) in /Users/hannahhaken/workarea/LLamaSharp/ConsoleApp1/Program.cs:line 11
   at Program.<Main>(String[] args)

Any idea what could be causing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions