Skip to content

Conversation

ssmith-pc
Copy link
Contributor

@ssmith-pc ssmith-pc commented Aug 22, 2025

Problem

First pass implementation of control plane SDK for repositories.

Also includes a basic data plane impl that avoids using the OpenAPI generated types due to Document being such an open-ended type. More work is needed here

pc = Pinecone(api_key=os.getenv("PINECONE_API_KEY"))

repo_name = "aryn-parsed-example-8"

repo_model = pc.create_repository(
    name=f"{repo_name}",
    spec={
        "serverless": {
            "cloud": "aws",
            "region": "us-east-1",
        },
    },
    schema={
        "fields": {
            "$.parsed[*].text_representation": {
                "description": "Text representation of the chunk",
                "embedded": True,
            },
        },
    },
    timeout=300,
)

repo_model = pc.describe_repository(name=repo_name)

# data plane
repo = pc.Repository(host=repo_model.host)

document = get_document()
response = repo.upsert(
    namespace="foo",
    document=document,
    echo=True,
)

pc.delete_repository(name=repo_name, timeout=300)

Solution

Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Describe specific steps for validating this change.

upsert working?

temp routing name

fetch

list

type name

inline request body for upsert

upsert request body

_id magic

.

Simple HTTP impl

update route name

updates
@ssmith-pc ssmith-pc changed the title basic upsert [ce] basic upsert Sep 18, 2025
@ssmith-pc ssmith-pc changed the title [ce] basic upsert [ce] repository control plane and data plane Sep 19, 2025
Copy link
Contributor

@rohanshah18 rohanshah18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have some concerns around:

  1. Using custom vs openApi generated client
  2. Lack of testing

@akelch11
Copy link

looks good from a standpoint of type correctness, can't comment on SDK specific mechanics. dunder methods make sense intuitively

@ssmith-pc ssmith-pc merged commit a330b63 into dev-ckb-sdk Sep 29, 2025
63 of 67 checks passed
@ssmith-pc ssmith-pc deleted the ssmith/ckb-sdk-impl branch September 29, 2025 05:35
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.

3 participants