Skip to content

Update the Assistant quickstart notebook to Python SDK v10 - #623

Merged
nicoalba10 merged 2 commits into
mainfrom
nico/assistant-quickstart-sdk-v10
Oct 8, 2026
Merged

nicoalba10 merged 2 commits into
mainfrom
nico/assistant-quickstart-sdk-v10

Conversation

@nicoalba10

@nicoalba10 nicoalba10 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The Assistant quickstart notebook is linked from the Pinecone Assistant SDK quickstart and the docs' Assistant examples page. It installs the latest SDK, which is now v10, but its code predates v10, so it breaks partway through.

Fixes

  • The chat cell imported Message from pinecone_plugins, which v10 doesn't ship, so it crashed with an ImportError.
  • The evaluation cell was missing a closing parenthesis.
  • Clean up deleted example-assistant with a placeholder key, but the notebook creates quickstart-assistant.
  • Readers had to download the PDF and upload it to Colab by hand. The notebook now downloads it.

Changes

  • Uses the current v10 calls (pc.assistants.create, upload_file, list_files, chat, context, and delete) and pins pinecone==10.0.0 and pinecone-notebooks==0.1.1.
  • Uses the repo's standard API key helper: environment variable, then the Colab widget, then a prompt.
  • Matches the updated docs quickstart: same steps and sample file, and the paid-only evaluation step moves to Next steps.
  • Adds an intro and prerequisites, fixes the duplicate step 3, and prints answers and citations instead of raw response objects.

I ran the notebook top to bottom with this repo's CI runner (.github/actions/run-notebook/run-notebook.py) against the live API. It passed and cleaned up after itself.


Note

Low Risk
Documentation-only notebook changes with no production code; main risk is readers following outdated API patterns if something was missed.

Overview
Rewrites docs/assistant-quickstart.ipynb so it runs end-to-end on Pinecone Python SDK v10, matching the linked docs quickstart.

The notebook now pins pinecone==10.0.0 and pinecone-notebooks==0.1.1, uses the pc.assistants.* surface (create, upload_file, list_files, chat, context, delete) instead of the old pc.assistant / plugin Message types, and chats with plain {"role", "content"} message dicts. Setup adds a shared get_pinecone_api_key() helper (env → Colab auth → prompt).

Upload downloads the sample Netflix 10-K in-notebook (with a User-Agent header), waits for processing, and uses richer sample metadata. Outputs are trimmed to readable answer/citation/snippet lines instead of huge pprint blobs. The in-notebook evaluation REST call is removed and called out under Next steps; cleanup deletes quickstart-assistant via the same assistant_name variable.

Reviewed by Cursor Bugbot for commit 4fbba3b. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicoalba10
nicoalba10 requested a review from a team as a code owner October 8, 2026 21:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicoalba10
nicoalba10 merged commit db00242 into main Oct 8, 2026
12 checks passed
@nicoalba10
nicoalba10 deleted the nico/assistant-quickstart-sdk-v10 branch October 8, 2026 22:33
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.

1 participant