nbaldwin's picture
demo + readme
c415e05
raw
history blame
2.79 kB
chroma_demo_flow:
input_interface:
- "operation"
- "content"
output_interface:
- "retrieved"
_target_: flows.base_flows.SequentialFlow.instantiate_from_default_config
name: "demoChromaDBFlow"
description: "An example flow of how to read and writed in a ChromaDBFlowModule."
subflows_config:
chroma_db:
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["operation","content"]
_target_: aiflows.VectorStoreFlowModule.ChromaDBFlow.instantiate_from_default_config
backend:
_target_: flows.backends.llm_lite.LiteLLMBackend
api_infos: ???
model_name: "" #Not used in current implementation
n_results: 1 # number of results to retrieve when query
topology:
- goal: Write content to the ChromaDB
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["operation","content"]
flow: chroma_db
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_set:
operation: "read"
keys_to_rename:
retrieved: content
keys_to_select: ["operation","content"]
- goal: Read content from the ChromaDB
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["operation","content"]
flow: chroma_db
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["retrieved"]
vector_store_demo_flow:
input_interface:
- "operation"
- "content"
output_interface:
- "retrieved"
name: "demoVectorStoreFlow"
description: "An example flow of how to read and write in a VectorStoreFlowModule."
_target_: flows.base_flows.SequentialFlow.instantiate_from_default_config
subflows_config:
vs_db:
_target_: aiflows.VectorStoreFlowModule.VectorStoreFlow.instantiate_from_default_config
backend:
_target_: flows.backends.llm_lite.LiteLLMBackend
api_infos: ???
model_name: "" #Not used in current implementation
topology:
- goal: Write content to the VectorStore
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["operation","content"]
flow: vs_db
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_set:
operation: "read"
keys_to_rename:
retrieved: content
keys_to_select: ["operation","content"]
- goal: Read content from the VectorStore
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["operation","content"]
flow: vs_db
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["retrieved"]