Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ AUTHORIZED_IMPORTS: List[str] = [
|
|
30 |
]
|
31 |
|
32 |
# Agent Initialization
|
33 |
-
def
|
34 |
"""Initialize the Koyeb Documentation Agent"""
|
35 |
tools = [
|
36 |
DuckDuckGoSearchTool(),
|
@@ -88,7 +88,7 @@ def setup_sidebar():
|
|
88 |
@st.cache_resource
|
89 |
def initialize_app():
|
90 |
"""Initialize the application"""
|
91 |
-
return
|
92 |
|
93 |
def main():
|
94 |
setup_ui()
|
@@ -99,7 +99,7 @@ def main():
|
|
99 |
st.session_state.agent = initialize_app()
|
100 |
|
101 |
search_query = st.text_input(
|
102 |
-
"🔍 Search
|
103 |
placeholder="E.g., How to use Terraform with the koyeb provider ?"
|
104 |
)
|
105 |
|
@@ -108,7 +108,7 @@ def main():
|
|
108 |
if search_query:
|
109 |
with st.spinner("Searching Koyeb documentation..."):
|
110 |
try:
|
111 |
-
results = st.session_state.agent.run(search_query, additional_args={"reference_websites": ['https://www.koyeb.com/docs', 'https://www.koyeb.com/tutorials', 'https://www.koyeb.com/deploy'],"instructions": "Response to the user answer as a structured documentation format."})
|
112 |
display_results(results)
|
113 |
|
114 |
st.markdown("---")
|
|
|
30 |
]
|
31 |
|
32 |
# Agent Initialization
|
33 |
+
def initialize_koyeb_agent(model=None):
|
34 |
"""Initialize the Koyeb Documentation Agent"""
|
35 |
tools = [
|
36 |
DuckDuckGoSearchTool(),
|
|
|
88 |
@st.cache_resource
|
89 |
def initialize_app():
|
90 |
"""Initialize the application"""
|
91 |
+
return initialize_koyeb_agent()
|
92 |
|
93 |
def main():
|
94 |
setup_ui()
|
|
|
99 |
st.session_state.agent = initialize_app()
|
100 |
|
101 |
search_query = st.text_input(
|
102 |
+
"🔍 Search Koyeb Documentation",
|
103 |
placeholder="E.g., How to use Terraform with the koyeb provider ?"
|
104 |
)
|
105 |
|
|
|
108 |
if search_query:
|
109 |
with st.spinner("Searching Koyeb documentation..."):
|
110 |
try:
|
111 |
+
results = st.session_state.agent.run(search_query, additional_args={"reference_websites": ['https://www.koyeb.com/docs', 'https://www.koyeb.com/tutorials', 'https://www.koyeb.com/deploy'],"instructions": "Response to the user answer as a structured markdown documentation format."})
|
112 |
display_results(results)
|
113 |
|
114 |
st.markdown("---")
|