Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,6 +69,26 @@ def main():
|
|
| 69 |
]
|
| 70 |
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
search_type = st.selectbox(
|
| 73 |
"Choose search type. Options are [Max marginal relevance search (similarity) , Similarity search (similarity). Default value (similarity)]",
|
| 74 |
options=["mmr", "similarity"],
|
|
@@ -89,6 +109,7 @@ def main():
|
|
| 89 |
)
|
| 90 |
|
| 91 |
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type=search_type, k=k, chunk_size=350, chunk_overlap=30)
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
|
|
|
|
| 69 |
]
|
| 70 |
|
| 71 |
|
| 72 |
+
class GraphState(TypedDict):
|
| 73 |
+
"""
|
| 74 |
+
Represents the state of our graph.
|
| 75 |
+
|
| 76 |
+
Attributes:
|
| 77 |
+
question: question
|
| 78 |
+
generation: LLM generation
|
| 79 |
+
search: whether to add search
|
| 80 |
+
documents: list of documents
|
| 81 |
+
generations_count : generations count
|
| 82 |
+
"""
|
| 83 |
+
|
| 84 |
+
question: str
|
| 85 |
+
generation: str
|
| 86 |
+
search: str
|
| 87 |
+
documents: List[str]
|
| 88 |
+
steps: List[str]
|
| 89 |
+
generation_count: int
|
| 90 |
+
|
| 91 |
+
|
| 92 |
search_type = st.selectbox(
|
| 93 |
"Choose search type. Options are [Max marginal relevance search (similarity) , Similarity search (similarity). Default value (similarity)]",
|
| 94 |
options=["mmr", "similarity"],
|
|
|
|
| 109 |
)
|
| 110 |
|
| 111 |
retriever = create_retriever_from_chroma(vectorstore_path="docs/chroma/", search_type=search_type, k=k, chunk_size=350, chunk_overlap=30)
|
| 112 |
+
|
| 113 |
|
| 114 |
|
| 115 |
|