From 962bbb486f1cbefdb6abb01ae483e5941fb32a6e Mon Sep 17 00:00:00 2001 From: IntelligenzaArtificiale <108482353+IntelligenzaArtificiale@users.noreply.github.com> Date: Mon, 1 May 2023 17:07:26 +0200 Subject: [PATCH] Add files via upload --- AUTOGPT.py | 10 ++++++++-- BABYAGI.py | 11 +++++++++-- Camel.py | 5 ++++- MetaPrompt.py | 10 ++++++++-- requirements.txt | 2 ++ 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/AUTOGPT.py b/AUTOGPT.py index 0440fd8..e3bc233 100644 --- a/AUTOGPT.py +++ b/AUTOGPT.py @@ -21,7 +21,10 @@ try : import argparse parser = argparse.ArgumentParser() parser.add_argument("--hf_token", help="huggingface token, check https://huggingface.co/settings/tokens for get your token") - parser.add_argument("--chatgpt_token", help="chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + parser.add_argument("--chatgpt_token", help="chatgpt token: \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") args = parser.parse_args() if args.hf_token is None or args.chatgpt_token is None: @@ -34,7 +37,10 @@ except: print("Huggingface token, check https://huggingface.co/settings/tokens for get your token") HF_TOKEN = input("Insert huggingface token >>> ") os.environ["HUGGINGFACEHUB_API_TOKEN"] = HF_TOKEN - print("Chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + print("Chatgpt token : \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") CG_TOKEN = input("Insert chatgpt token >>> ") os.environ["CHATGPT_TOKEN"] = CG_TOKEN diff --git a/BABYAGI.py b/BABYAGI.py index 1635851..9dce880 100644 --- a/BABYAGI.py +++ b/BABYAGI.py @@ -6,6 +6,7 @@ from langchain import HuggingFaceHub from langchain.docstore import InMemoryDocstore from langchain import LLMChain, PromptTemplate from langchain.llms import BaseLLM +from FreeLLM import pyChatGPT # FREE CHATGPT API from FreeLLM import ChatGPTAPI # FREE CHATGPT API from langchain.vectorstores.base import VectorStore from pydantic import BaseModel, Field @@ -18,7 +19,10 @@ try : import argparse parser = argparse.ArgumentParser() parser.add_argument("--hf_token", help="huggingface token, check https://huggingface.co/settings/tokens for get your token") - parser.add_argument("--chatgpt_token", help="chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + parser.add_argument("--chatgpt_token", help="chatgpt token: \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") args = parser.parse_args() if args.hf_token is None or args.chatgpt_token is None: @@ -31,7 +35,10 @@ except: print("Huggingface token, check https://huggingface.co/settings/tokens for get your token") HF_TOKEN = input("Insert huggingface token >>> ") os.environ["HUGGINGFACEHUB_API_TOKEN"] = HF_TOKEN - print("Chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + print("Chatgpt token : \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") CG_TOKEN = input("Insert chatgpt token >>> ") os.environ["CHATGPT_TOKEN"] = CG_TOKEN diff --git a/Camel.py b/Camel.py index 325ee6d..da1c85c 100644 --- a/Camel.py +++ b/Camel.py @@ -75,7 +75,10 @@ word_limit = st.number_input("Word Limit", 10, 1500, 50) token_CG = st.text_input("Insert your ChatGPT token", "") with st.expander("How to get your ChatGPT token"): - st.markdown("Click [here](https://chat.openai.com/api/auth/session)
Login with your OpenAI account if you are not already logged in
Copy the token called 'accessToken' and paste it in the text box above", unsafe_allow_html=True) + st.markdown("chatgpt token: \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.", unsafe_allow_html=True) if st.button("Start Autonomus AI AGENT") and token_CG != "": os.environ["CHATGPT_TOKEN"] = token_CG diff --git a/MetaPrompt.py b/MetaPrompt.py index 64d5aa0..1f4465a 100644 --- a/MetaPrompt.py +++ b/MetaPrompt.py @@ -9,7 +9,10 @@ try : #read from args the hf token and chatgpt token import argparse parser = argparse.ArgumentParser() - parser.add_argument("--chatgpt_token", help="chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + parser.add_argument("--chatgpt_token", help="Chatgpt token : \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") args = parser.parse_args() if args.chatgpt_token is None: @@ -18,7 +21,10 @@ try : os.environ["CHATGPT_TOKEN"] = args.chatgpt_token except: print("You must provide the chatgpt token") - print("Chatgpt token, check https://chat.openai.com/api/auth/session for get your token") + print("Chatgpt token : \n \ + Go to https://chat.openai.com/chat and open the developer tools by F12. \n \ + Find the __Secure-next-auth.session-token cookie in Application > Storage > Cookies > https://chat.openai.com \n \ + Copy the value in the Cookie Value field.") CG_TOKEN = input("Insert chatgpt token >>> ") os.environ["CHATGPT_TOKEN"] = CG_TOKEN diff --git a/requirements.txt b/requirements.txt index f5dfaa7..144f8ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,3 +16,5 @@ torch # tensorflow >= 2.0 -- For other future models # flax -- For other future models pytest-playwright +undetected-chromedriver>=3.2.1 +markdownify>=0.11.6