How to provide namespace value of pinecone index in azure open ai api payload

Manjunath Murgod 0 Reputation points
2024-09-07T05:57:48.6333333+00:00

where and how to specify the pinecone namespace value as each index can have more than one namespaces. it's not documented in https://learn.microsoft.com/en-us/azure/ai-services/openai/references/pinecone?tabs=python#deployment-name-vectorization-source

extra_body={ "data_sources": [ { "type": "pinecone", "parameters": {}}]}

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,830 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vlad Costa 1,480 Reputation points
    2024-09-07T07:18:12.2533333+00:00

    Hi @Manjunath Murgod

    You need to include the parameter within your operations to specify the Pinecone namespace value. Each index can have multiple namespaces, and you can partition your records accordingly. Here’s an example of how to define the namespace in your extra_body:

    extra_body = {
        "data_sources": [
            {
                "type": "pinecone",
                "parameters": {
                    "namespace": "your-namespace-pinecone-value"
                }
            }
        ]
    }
    
    

    A name uniquely identifies namespaces, and almost all operations accept this parameter to limit their work to the specified namespace. If you don’t specify a namespace, Pinecone uses the default namespace, which is an empty string "".

    For more detailed information, refer to the Pinecone documentation in the link below on namespaces.

    https://docs.pinecone.io/guides/indexes/use-namespaces


    If this answers your question, please click Accept Answer and Yes if this answer was helpful. Doing so would help other community members with similar issues identify the solution.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.