# To use the Python SDK, install the plugin:# pip install --upgrade pinecone pinecone-plugin-assistantfrom pinecone import Pineconepc = Pinecone(api_key="YOUR_API_KEY")assistant = pc.assistant.describe_assistant( assistant_name="example-assistant", )
This operation returns a response like the following:
Copy
{ "name": "example-assistant", "instructions": "Use American English for spelling and grammar.", "metadata": {}, "status": "Initializing", "created_on": "2023-11-07T05:31:56Z", "updated_on": "2023-11-07T05:31:56Z"}
The status field has the following possible values:
Initializing
Failed
Ready
Terminating
You can check the status of an assistant using the Pinecone console.
The chat model is the underlying large language model (LLM) that powers the assistant’s responses. You can change the chat model for an existing assistant through the Pinecone console:
On the Assistants page, select the assistant you want to update.
In the sidebar on the right, select Settings (gear icon).
You can add or update the instructions for an existing assistant. Instructions are a short description or directive for the assistant to apply to all of its responses. For example, you can update the instructions to reflect the assistant’s role or purpose.For example:
Copy
# To use the Python SDK, install the plugin:# pip install --upgrade pinecone pinecone-plugin-assistantfrom pinecone import Pineconepc = Pinecone(api_key=YOUR_API_KEY)assistant = pc.assistant.update_assistant( assistant_name="example-assistant", instructions="Use American English for spelling and grammar.", region="us" # Region to deploy assistant. Options: "us" (default) or "eu".)
The example above returns a result like the following:
Copy
{ "name":"example-assistant", "instructions":"Use American English for spelling and grammar.", "metadata":{"updated":"2024-09-30"}, "status":"Ready", "created_at":"2024-06-14T14:58:06.573004549Z", "updated_at":"2024-10-01T19:44:32.813235817Z"}
You can add or update instructions for an assistant using the Pinecone console.