seanpixel / teenage-agi Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
May I know
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
I've been getting an error saying the the model gpt-4 doesn't exist and had to plumb in gpt-3.5-turbo to make it work. Also FYI, might want to mention in the instructions that when you clone the repo the directory is set to read only, so it can't write to the memory count yaml file and bombs out, so need to change the directory permissions.
Is there a way to change the pinecone environment? I am getting the following error. My pinecone API env is set to northamerica-northeast1-gcp but as you can see in the error code, it is trying to use "us-west1-gcp". I can not seem to change it to west in the pinecone console, so I beleive I have to set it within Teenage-AGI. Anyone know how to do this? I did add the correct enviornment in the .evn file. Also see below/
.env
OPENAI_API_BASE_URL=https://api.openai.com/v1
OPENAI_API_KEY=************************************************************
PINECONE_API_KEY=************************************************************
PINECONE_ENV=northamerica-northeast1-gcp
ELEVENLABS_API_KEY=************************************************************
ELEVENLABS_VOICE_2_ID=generated/Liam
SMART_LLM_MODEL=gpt-4
FAST_LLM_MODEL=gpt-3.5-turbo
GOOGLE_API_KEY=************************************************************
CUSTOM_SEARCH_ENGINE_ID=c772991b1d7c24133
USE_AZURE=False
OPENAI_AZURE_API_BASE=your-base-url-for-azure
OPENAI_AZURE_API_VERSION=api-version-for-azure
OPENAI_AZURE_DEPLOYMENT_ID=deployment-id-for-azure
OPENAI_AZURE_CHAT_DEPLOYMENT_ID=deployment-id-for-azure-chat
OPENAI_AZURE_EMBEDDINGS_DEPLOYMENT_ID=deployment-id-for-azure-embeddigs
IMAGE_PROVIDER=sd
HUGGINGFACE_API_TOKEN=************************************************************
USE_MAC_OS_TTS=False
MEMORY_BACKEND=pinecone
Error
(venv) C:\Users\jerem\Teenage-AGI>
(venv) C:\Users\jerem\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\main.py", line 14, in
agent.createIndex()
File "C:\Users\jerem\Teenage-AGI\agent.py", line 100, in createIndex
if self.table_name not in pinecone.list_indexes():
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\manage.py", line 185, in list_indexes
response = api_instance.list_indexes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 776, in call
return self.callable(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api\index_operations_api.py", line 1132, in __list_indexes
return self.call_with_http_info(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\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\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 413, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 207, in __call_api
raise e
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 200, in __call_api
response_data = self.request(
^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\api_client.py", line 439, in request
return self.rest_client.GET(url,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\rest.py", line 236, in GET
return self.request("GET", url,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jerem\Teenage-AGI\venv\Lib\site-packages\pinecone\core\client\rest.py", line 219, in request
raise UnauthorizedException(http_resp=r)
pinecone.core.client.exceptions.UnauthorizedException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'www-authenticate': 'API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.', 'content-length': '114', 'date': 'Sat, 29 Apr 2023 13:11:44 GMT', 'server': 'envoy'})
HTTP response body: API key is missing or invalid for the environment "us-west1-gcp". Check that the correct environment is specified.
The data from previous conversations is persisting from one session to the next and data is being properly recorded and recalled, with the exception of the agent's name. I have, in one command, told it its name and had it repeat it to me. It can do this, but when prompted in subsequent commands, it outputs "My name is [insert name here]."
I'm completely new to Pinecone and vector databases, so this could very well be something basic that I'm doing wrong. Any suggestions?
Really fun piece of code, thanks for sharing it!
can teenage-agi work along side with baby-agi?
say if baby-agi is a chain in langchain, where can teenage-agi fit to add the functionality of memory and provide relevant responses
I spent some time on a fork of Teenage-AGI that works a little differently and seems to work quite nicely in retaining context, discovering facts and previous conversations, and just remembering who you specifically are and what you've talked about. Also tried to make it respond a bit more like GPT just chatting.
https://github.com/benjcooley/MemPuppy-AGI
It's pretty fun to chat with MemPuppy/Teenage as it remembers you and will bring up information about you, your interests and projects, and prior bits from other conversations you've had. Feels like talking to a buddy.
Just thought you might be interested.
Hey friends,
Thank you so much for embarking on this work, and sharing your progress with the world. What I imagined as reality in 2038 is fast approaching us in 2023.
I'm trying to diagnosis why I'm receiving the error, "openai.error.InvalidRequestError: The model: gpt-4
does not exist" if I possess a paid plan and OpenAI API key (which is correctly set in my .env). Last night I successfully ran AutoGPT with it, so I'm not sure why I can't access it now. Has any anyone else encountered this specifically with Teenage-AGI?
`docker-compose run teenage-agi
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data] Unzipping tokenizers/punkt.zip.
Talk to the AI!
Hi
------------INTERNAL THOUGHT PROMPT------------
You have been given the following input: Hi.
You must think about it and plan what action to take.
For some context, here are your memories related to the query.
MEMORIES sorted in relevance:
Think of some actions you would take after hearing "Hi" based on your past thoughts and actions.
This is not shown to the outside world but only to yourself. It is just your internal thought."
Traceback (most recent call last):
File "/app/main.py", line 28, in <module>
print(agent.action(userInput), "\n")
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 164, in action
internal_thought, top_matches = self.internalThought(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 153, in internalThought
internal_thought = generate(internalThoughtPrompt) # OPENAI CALL: top_matches and query text is used here
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 21, in generate
completion = openai.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: The model: `gpt-4` does not exist`
when initially running, crashes with index creation. No index is setup currently and its not creating one, have also tried creating one and it isnt correct parameters. asia-southeast1-gcp. starter account. only 1 project on account. fresh api key for that project. actually only 1 api key in pinecone account as well
pinecone.core.client.exceptions.ForbiddenException: (403)
Reason: Forbidden
HTTP response body: Index creation is disabled for this environment, please try a different environment.
I've been experimenting with read: and think: but i'm not able to make the AI recall anything i feed it.... the infinite chat memory is working great tho!
has anyone else experienced this?
On average, it takes about 20 seconds to respond. Is there any way to improve its response speed?
I'm getting this error, it seems like a PINECONE problem.
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='controller.asia-southeast1-gc.pinecone.io', port=443): Max retries exceeded with url: /databases (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x14970f490>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
I've tried:
I'm out of ideas :/
I've downloaded all the packages and get a pexpect error when I run main.py. See below. Thanks for taking a look!
PS C:\Users*\Teenage-AGI> & C:/Python311/python.exe c:/Users/*/Teenage-AGI/main.py
Traceback (most recent call last):
File "c:\Users*\Teenage-AGI\main.py", line 1, in
import agent
File "c:\Users*\Teenage-AGI\agent.py", line 7, in
from langchain.text_splitter import NLTKTextSplitter
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain_init_.py", line 6, in
from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\agents_init_.py", line 2, in
from langchain.agents.agent import (
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\agents\agent.py", line 15, in
from langchain.agents.tools import InvalidTool
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\agents\tools.py", line 8, in
from langchain.tools.base import (
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\tools_init_.py", line 4, in
from langchain.tools.bing_search.tool import BingSearchResults, BingSearchRun
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\tools\bing_search\tool.py", line 4, in
from langchain.utilities.bing_search import BingSearchAPIWrapper
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\utilities_init_.py", line 5, in
from langchain.utilities.bash import BashProcess
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\utilities\bash.py", line 10, in
class BashProcess:
File "C:\Users*\AppData\Roaming\Python\Python311\site-packages\langchain\utilities\bash.py", line 29, in BashProcess
def _initialize_persistent_process(prompt: str) -> pexpect.spawn:
^^^^^^^^^^^^^
AttributeError: module 'pexpect' has no attribute 'spawn'
Traceback (most recent call last):
File "/app/main.py", line 24, in <module>
print("\n", agent.action(userInput))
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 142, in action
internal_thought, top_matches = self.internalThought(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 121, in internalThought
query_embedding = get_ada_embedding(query)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/agent.py", line 61, in get_ada_embedding
return openai.Embedding.create(input=[text], model="text-embedding-ada-002")[
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_resources/embedding.py", line 33, in create
response = super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.11/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: [''] is not valid under any of the given schemas - 'input'
(after second instruction given) running in docker
I've tried renaming things without capitals, but nothing works?
PS C:\Users\joshu\Documents\_aipython\LLMS\teenage-agi> python main.py Traceback (most recent call last): File "C:\Users\joshu\Documents\_aipython\LLMS\teenage-agi\main.py", line 7, in <module> agent.createIndex() File "C:\Users\joshu\Documents\_aipython\LLMS\teenage-agi\agent.py", line 81, in createIndex pinecone.create_index( File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\manage.py", line 118, in create_index api_instance.create_index(create_request=CreateRequest( File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 776, in __call__ return self.callable(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\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\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 838, in call_with_http_info return self.api_client.call_api( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 413, in call_api return self.__call_api(resource_path, method, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 207, in __call_api raise e File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 200, in __call_api response_data = self.request( ^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 459, in request return self.rest_client.POST(url, ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pinecone\core\client\rest.py", line 271, in POST return self.request("POST", url, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\joshu\AppData\Local\Programs\Python\Python311\Lib\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': 'Wed, 12 Apr 2023 02:36:38 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.