summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoptuno <repollo.marrero@gmail.com>2023-04-28 02:48:00 +0200
committernoptuno <repollo.marrero@gmail.com>2023-04-28 02:48:00 +0200
commit104e58a3421665fc3acfd7fea8e1317fe1181c6d (patch)
tree092030df5d098e91908622dd0d991f591bd555be
parentResolved merge conflicts and merged pr_218 into STREAMLIT_CHAT_IMPLEMENTATION (diff)
downloadgpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar.gz
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar.bz2
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar.lz
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar.xz
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.tar.zst
gpt4free-104e58a3421665fc3acfd7fea8e1317fe1181c6d.zip
-rw-r--r--.gitignore2
-rw-r--r--conversations.pklbin3989 -> 5160 bytes
-rw-r--r--gui/query_methods.py24
-rw-r--r--gui/streamlit_chat_app.py4
-rw-r--r--openai_rev/forefront/__pycache__/__init__.cpython-39.pycbin4705 -> 4705 bytes
-rw-r--r--openai_rev/forefront/__pycache__/mail.cpython-39.pycbin2387 -> 2387 bytes
-rw-r--r--openai_rev/forefront/__pycache__/models.cpython-39.pycbin1048 -> 1048 bytes
-rw-r--r--openai_rev/quora/__pycache__/__init__.cpython-39.pycbin16849 -> 16849 bytes
-rw-r--r--openai_rev/quora/__pycache__/api.cpython-39.pycbin14020 -> 14020 bytes
-rw-r--r--openai_rev/quora/__pycache__/mail.cpython-39.pycbin2456 -> 2456 bytes
-rw-r--r--openai_rev/theb/__pycache__/__init__.cpython-39.pycbin1897 -> 1897 bytes
-rw-r--r--openai_rev/you/__pycache__/__init__.cpython-39.pycbin3467 -> 3467 bytes
12 files changed, 15 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index b063aca5..4034c08f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,8 @@ accounts.txt
**/__pycache__/
+__pycache__/
+
*.log
cookie.json
diff --git a/conversations.pkl b/conversations.pkl
index 19b5cb1d..83d79d34 100644
--- a/conversations.pkl
+++ b/conversations.pkl
Binary files differ
diff --git a/gui/query_methods.py b/gui/query_methods.py
index 08a81b64..49946900 100644
--- a/gui/query_methods.py
+++ b/gui/query_methods.py
@@ -53,19 +53,19 @@ def query_you(question: str) -> str:
# Return error message if an exception occurs
return f'An error occurred: {e}. Please make sure you are using a valid cloudflare clearance token and user agent.'
-# Define a dictionary containing all query methods
-avail_query_methods = {
- "Forefront": query_forefront,
- "Poe": query_quora,
- "Theb": query_theb,
- "You": query_you,
- # "Writesonic": query_writesonic,
- # "T3nsor": query_t3nsor,
- # "Phind": query_phind,
- # "Ora": query_ora,
-}
def query(user_input: str, selected_method: str = "Random") -> str:
+ # Define a dictionary containing all query methods
+ avail_query_methods = {
+ "Forefront": query_forefront,
+ "Poe": query_quora,
+ "Theb": query_theb,
+ "You": query_you,
+ # "Writesonic": query_writesonic,
+ # "T3nsor": query_t3nsor,
+ # "Phind": query_phind,
+ # "Ora": query_ora,
+ }
# If a specific query method is selected (not "Random") and the method is in the dictionary, try to call it
if selected_method != "Random" and selected_method in avail_query_methods:
@@ -98,5 +98,3 @@ def query(user_input: str, selected_method: str = "Random") -> str:
return result
-
-__all__ = ['query', 'avail_query_methods']
diff --git a/gui/streamlit_chat_app.py b/gui/streamlit_chat_app.py
index 09d53bcf..aee3563e 100644
--- a/gui/streamlit_chat_app.py
+++ b/gui/streamlit_chat_app.py
@@ -5,10 +5,11 @@ sys.path.append(os.path.join(os.path.dirname(__file__), os.path.pardir))
import streamlit as st
from streamlit_chat import message
-from query_methods import query, avail_query_methods
+from query_methods import query
import pickle
import openai_rev
+
conversations_file = "conversations.pkl"
def load_conversations():
@@ -71,7 +72,6 @@ if st.sidebar.button("New Conversation"):
st.session_state['current_conversation'] = {'user_inputs': [], 'generated_responses': []}
st.session_state['input_field_key'] += 1
-print(openai_rev.Provider.__methods__.keys())
st.session_state['query_method'] = st.sidebar.selectbox(
"Select API:",
options=openai_rev.Provider.__members__.keys(),
diff --git a/openai_rev/forefront/__pycache__/__init__.cpython-39.pyc b/openai_rev/forefront/__pycache__/__init__.cpython-39.pyc
index f1b82a23..4e76781d 100644
--- a/openai_rev/forefront/__pycache__/__init__.cpython-39.pyc
+++ b/openai_rev/forefront/__pycache__/__init__.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/forefront/__pycache__/mail.cpython-39.pyc b/openai_rev/forefront/__pycache__/mail.cpython-39.pyc
index c903d3db..b5500715 100644
--- a/openai_rev/forefront/__pycache__/mail.cpython-39.pyc
+++ b/openai_rev/forefront/__pycache__/mail.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/forefront/__pycache__/models.cpython-39.pyc b/openai_rev/forefront/__pycache__/models.cpython-39.pyc
index 153edef7..66a44c79 100644
--- a/openai_rev/forefront/__pycache__/models.cpython-39.pyc
+++ b/openai_rev/forefront/__pycache__/models.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/quora/__pycache__/__init__.cpython-39.pyc b/openai_rev/quora/__pycache__/__init__.cpython-39.pyc
index f5e4ef8d..93056240 100644
--- a/openai_rev/quora/__pycache__/__init__.cpython-39.pyc
+++ b/openai_rev/quora/__pycache__/__init__.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/quora/__pycache__/api.cpython-39.pyc b/openai_rev/quora/__pycache__/api.cpython-39.pyc
index 01645ec7..ef34e4ed 100644
--- a/openai_rev/quora/__pycache__/api.cpython-39.pyc
+++ b/openai_rev/quora/__pycache__/api.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/quora/__pycache__/mail.cpython-39.pyc b/openai_rev/quora/__pycache__/mail.cpython-39.pyc
index 009a06ef..ddbea704 100644
--- a/openai_rev/quora/__pycache__/mail.cpython-39.pyc
+++ b/openai_rev/quora/__pycache__/mail.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/theb/__pycache__/__init__.cpython-39.pyc b/openai_rev/theb/__pycache__/__init__.cpython-39.pyc
index 00d672bd..812a9f01 100644
--- a/openai_rev/theb/__pycache__/__init__.cpython-39.pyc
+++ b/openai_rev/theb/__pycache__/__init__.cpython-39.pyc
Binary files differ
diff --git a/openai_rev/you/__pycache__/__init__.cpython-39.pyc b/openai_rev/you/__pycache__/__init__.cpython-39.pyc
index 7ba27a73..54caf6ef 100644
--- a/openai_rev/you/__pycache__/__init__.cpython-39.pyc
+++ b/openai_rev/you/__pycache__/__init__.cpython-39.pyc
Binary files differ