Skip to content

Commit

Permalink
Adding initial test from 9 months ago
Browse files Browse the repository at this point in the history
  • Loading branch information
aljcalandra committed Jun 26, 2024
1 parent 307eba9 commit b8b9607
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
venv/
api-key
16 changes: 16 additions & 0 deletions test-client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pinecone

with open('api-key') as f:
pinecone.init(f.read(), environment='gcp-starter')

index = pinecone.Index('test')

# index.upsert([("a", [1.,1.]),("b", [2.,2.]),("c", [3.,3.])])

fetch_results = index.fetch(ids=["a", "b", "c"])
print(fetch_results)

query_results = index.query([1.1, 1.1], top_k=2)
print(query_results)

print(index.describe_index_stats())

0 comments on commit b8b9607

Please sign in to comment.