seanpixel / Teenage-AGI

MIT License
907 stars 111 forks source link

Problem with name of index (Pinecone) #21

Open solo2424 opened 1 year ago

solo2424 commented 1 year ago

So I am getting the following error. When searching this error in ChatGPT, it states that Ineed to check the name of the index I am trying to create. Can anyone point me in the right direction?

C:\Users\jerem\Teenage-AGI\Teenage-AGI>python main.py [nltk_data] Downloading package punkt to [nltk_data] C:\Users\jerem\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! Traceback (most recent call last): File "C:\Users\jerem\Teenage-AGI\Teenage-AGI\main.py", line 14, in agent.createIndex() File "C:\Users\jerem\Teenage-AGI\Teenage-AGI\agent.py", line 101, in createIndex pinecone.create_index( File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\manage.py", line 118, in create_index api_instance.create_index(create_request=CreateRequest( File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 776, in call return self.callable(self, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api\index_operations_api.py", line 370, in __create_index return self.call_with_http_info(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 838, in call_with_http_info return self.api_client.call_api( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 413, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 207, in call_api raise e File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 200, in call_api response_data = self.request( ^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\api_client.py", line 459, in request return self.rest_client.POST(url, ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\rest.py", line 271, in POST return self.request("POST", url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jerem\AppData\Roaming\Python\Python311\site-packages\pinecone\core\client\rest.py", line 230, in request raise ApiException(http_resp=r) pinecone.core.client.exceptions.ApiException: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'content-type': 'text/plain; charset=UTF-8', 'date': 'Sat, 29 Apr 2023 14:14:10 GMT', 'x-envoy-upstream-service-time': '0', 'content-length': '123', 'server': 'envoy'}) HTTP response body: Index name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character

seanpixel commented 1 year ago

The index name should be all lowercase, could you check that?