deprioritize duckduckgo
Browse files
agents.py
CHANGED
@@ -104,7 +104,7 @@ def salesAgent(instruction):
|
|
104 |
print("panda> " + output)
|
105 |
except Exception as e:
|
106 |
logger.error(e)
|
107 |
-
output = f"
|
108 |
return output
|
109 |
|
110 |
def chinookAgent(instruction, model_name):
|
@@ -115,5 +115,5 @@ def chinookAgent(instruction, model_name):
|
|
115 |
print("chinook> " + output)
|
116 |
except Exception as e:
|
117 |
logger.error(e)
|
118 |
-
output = "
|
119 |
return output
|
|
|
104 |
print("panda> " + output)
|
105 |
except Exception as e:
|
106 |
logger.error(e)
|
107 |
+
output = f"Rephrasing your prompt could get better results {e}"
|
108 |
return output
|
109 |
|
110 |
def chinookAgent(instruction, model_name):
|
|
|
115 |
print("chinook> " + output)
|
116 |
except Exception as e:
|
117 |
logger.error(e)
|
118 |
+
output = "Rephrasing your prompt could get better db results {e}"
|
119 |
return output
|
app.py
CHANGED
@@ -68,6 +68,7 @@ if question_text and len(question_text) > 1:
|
|
68 |
height = min(2*len(output), 280)
|
69 |
st.text_area(label="In response ...",
|
70 |
value=output, height=height)
|
|
|
71 |
|
72 |
##############################################################################
|
73 |
|
|
|
68 |
height = min(2*len(output), 280)
|
69 |
st.text_area(label="In response ...",
|
70 |
value=output, height=height)
|
71 |
+
## st.code(output, language="markdown")
|
72 |
|
73 |
##############################################################################
|
74 |
|
models.py
CHANGED
@@ -72,14 +72,14 @@ from langchain.tools import DuckDuckGoSearchRun, GoogleSearchRun
|
|
72 |
from langchain.utilities import GoogleSearchAPIWrapper
|
73 |
def load_chained_agent(verbose=True, model_name="text-davinci-003"):
|
74 |
llm = createLLM(model_name)
|
75 |
-
toolkit = [
|
76 |
-
toolkit += load_tools(["serpapi", "open-meteo-api", "news-api",
|
77 |
"python_repl", "wolfram-alpha"],
|
78 |
llm=llm,
|
79 |
serpapi_api_key=os.getenv('SERPAPI_API_KEY'),
|
80 |
news_api_key=os.getenv('NEWS_API_KEY'),
|
81 |
tmdb_bearer_token=os.getenv('TMDB_BEARER_TOKEN')
|
82 |
)
|
|
|
83 |
|
84 |
agent = initialize_agent(toolkit,
|
85 |
llm,
|
|
|
72 |
from langchain.utilities import GoogleSearchAPIWrapper
|
73 |
def load_chained_agent(verbose=True, model_name="text-davinci-003"):
|
74 |
llm = createLLM(model_name)
|
75 |
+
toolkit = load_tools(["serpapi", "open-meteo-api", "news-api",
|
|
|
76 |
"python_repl", "wolfram-alpha"],
|
77 |
llm=llm,
|
78 |
serpapi_api_key=os.getenv('SERPAPI_API_KEY'),
|
79 |
news_api_key=os.getenv('NEWS_API_KEY'),
|
80 |
tmdb_bearer_token=os.getenv('TMDB_BEARER_TOKEN')
|
81 |
)
|
82 |
+
toolkit += [DuckDuckGoSearchRun()]
|
83 |
|
84 |
agent = initialize_agent(toolkit,
|
85 |
llm,
|