mirror of
https://github.com/IntelligenzaArtificiale/Free-Auto-GPT.git
synced 2026-07-03 13:15:41 +02:00
Add files via upload
This commit is contained in:
committed by
GitHub
parent
e2eb2e29e2
commit
962bbb486f
+8
-2
@@ -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
|
||||
|
||||
|
||||
+9
-2
@@ -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
|
||||
|
||||
|
||||
@@ -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) <br>Login with your OpenAI account if you are not already logged in <br>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
|
||||
|
||||
+8
-2
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user