Spaces:
Runtime error
Runtime error
silvanocerza
commited on
Commit
•
61f90d6
1
Parent(s):
d94b965
Change component name
Browse files
main.py
CHANGED
@@ -152,13 +152,13 @@ def search(question: str) -> GeneratedAnswer:
|
|
152 |
|
153 |
query_pipeline.add_component("docs_retriever", retriever)
|
154 |
query_pipeline.add_component("prompt_builder", prompt_builder)
|
155 |
-
query_pipeline.add_component("
|
156 |
query_pipeline.add_component("answer_builder", answer_builder)
|
157 |
|
158 |
query_pipeline.connect("docs_retriever.documents", "prompt_builder.documents")
|
159 |
-
query_pipeline.connect("prompt_builder.prompt", "
|
160 |
query_pipeline.connect("docs_retriever.documents", "answer_builder.documents")
|
161 |
-
query_pipeline.connect("
|
162 |
res = query_pipeline.run({"query": question})
|
163 |
return res["answer_builder"]["answers"][0]
|
164 |
|
|
|
152 |
|
153 |
query_pipeline.add_component("docs_retriever", retriever)
|
154 |
query_pipeline.add_component("prompt_builder", prompt_builder)
|
155 |
+
query_pipeline.add_component("llm", generator)
|
156 |
query_pipeline.add_component("answer_builder", answer_builder)
|
157 |
|
158 |
query_pipeline.connect("docs_retriever.documents", "prompt_builder.documents")
|
159 |
+
query_pipeline.connect("prompt_builder.prompt", "llm.prompt")
|
160 |
query_pipeline.connect("docs_retriever.documents", "answer_builder.documents")
|
161 |
+
query_pipeline.connect("llm.replies", "answer_builder.replies")
|
162 |
res = query_pipeline.run({"query": question})
|
163 |
return res["answer_builder"]["answers"][0]
|
164 |
|