Giter VIP home page Giter VIP logo

langchain-13-min's People

Contributors

rabbitmetrics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

langchain-13-min's Issues

Pinecone Error

I get an error when I run below code:

Import and initialize Pinecone client

import os
import pinecone
from langchain.vectorstores import Pinecone

pinecone.init(
api_key=os.getenv('PINECONE_API_KEY'),
environment=os.getenv('PINECONE_ENV')
)

It asks me to run this instead:
import os
from pinecone import Pinecone, ServerlessSpec

pc = Pinecone(
api_key=os.environ.get("e9afe805-2827-4717-8f6a-310a11e12400")
)

Now do stuff

if 'my_index' not in pc.list_indexes().names():
pc.create_index(
name='my_index',
dimension=1536,
metric='euclidean',
spec=ServerlessSpec(
cloud='aws',
region='us-west-2'
)
)

But I keep getting an error on API key. I did obtain the API key from Pinecone. Any help is appreciated ?


PineconeConfigurationError Traceback (most recent call last)
in <cell line: 4>()
2 from pinecone import Pinecone, ServerlessSpec
3
----> 4 pc = Pinecone(
5 api_key=os.environ.get("e9afe805-2827-4717-8f6a-310a11e12400")
6 )

2 frames
/usr/local/lib/python3.10/dist-packages/pinecone/config/config.py in build(api_key, host, openapi_config, additional_headers, **kwargs)
43
44 if not api_key:
---> 45 raise PineconeConfigurationError("You haven't specified an Api-Key.")
46 if not host:
47 raise PineconeConfigurationError("You haven't specified a host.")

PineconeConfigurationError: You haven't specified an Api-Key.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.