renamed flows to aiflow
Browse filesFiles changed (7)
- ChromaDBFlow.py+2-2
- ChromaDBFlow.yaml+1-1
- README.md+3-3
- VectorStoreFlow.py+2-2
- VectorStoreFlow.yaml+1-1
- demo.yaml+15-15
- run.py+7-7
6 unmodified lines789101112136 unmodified lines202122232425266 unmodified linesfrom chromadb import Client as ChromaClientfrom flows.base_flows import AtomicFlowimport hydra6 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "ChromaDB is a document store that uses vector embeddings to store and retrieve documents."- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see flows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `n_results` (int): The number of results to retrieve when reading from the database. Default: 56 unmodified lines789101112136 unmodified lines202122232425266 unmodified linesfrom chromadb import Client as ChromaClientfrom aiflows.base_flows import AtomicFlowimport hydra6 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "ChromaDB is a document store that uses vector embeddings to store and retrieve documents."- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see aiflows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `n_results` (int): The number of results to retrieve when reading from the database. Default: 5
1 unmodified line23456781 unmodified linedescription: ChromaDB is a document store that uses vector embeddings to store and retrieve documentsbackend:_target_: flows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationinput_interface:1 unmodified line23456781 unmodified linedescription: ChromaDB is a document store that uses vector embeddings to store and retrieve documentsbackend:_target_: aiflows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationinput_interface:
41 unmodified lines4243444546474898 unmodified lines14714814915015115215315 unmodified lines16917017117217317417541 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "ChromaDB is a document store that uses vector embeddings to store and retrieve documents."- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see flows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `n_results` (int): The number of results to retrieve when reading from the database. Default: 598 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "VectorStoreFlow"- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see flows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `type` (str): The type of the vector store. It can be "chroma" or "faiss". Default: "chroma"15 unmodified lines- `backend` (`LiteLLMBackend`): The backend of the flow (used to retrieve the API key)- `vector_db` (`VectorStoreRetriever`): The vector store retriever- `type` (`str`): The type of the vector store- `\**kwargs`: Additional arguments to pass to the flow. See :class:`flows.base_flows.AtomicFlow` for more details.<a id="VectorStoreFlow.VectorStoreFlow.instantiate_from_config"></a>41 unmodified lines4243444546474898 unmodified lines14714814915015115215315 unmodified lines16917017117217317417541 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "ChromaDB is a document store that uses vector embeddings to store and retrieve documents."- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see aiflows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `n_results` (int): The number of results to retrieve when reading from the database. Default: 598 unmodified lines- `description` (str): A description of the flow. This description is used to generate the help message of the flow.Default: "VectorStoreFlow"- `backend` (Dict[str, Any]): The configuration of the backend which is used to fetch api keys. Default: LiteLLMBackend with thedefault parameters of LiteLLMBackend (see aiflows.backends.LiteLLMBackend). Except for the following parameter whose default value is overwritten:- `api_infos` (List[Dict[str, Any]]): The list of api infos. Default: No default value, this parameter is required.- `model_name` (str): The name of the model. Default: "". In the current implementation, this parameter is not used.- `type` (str): The type of the vector store. It can be "chroma" or "faiss". Default: "chroma"15 unmodified lines- `backend` (`LiteLLMBackend`): The backend of the flow (used to retrieve the API key)- `vector_db` (`VectorStoreRetriever`): The vector store retriever- `type` (`str`): The type of the vector store- `\**kwargs`: Additional arguments to pass to the flow. See :class:`aiflows.base_flows.AtomicFlow` for more details.<a id="VectorStoreFlow.VectorStoreFlow.instantiate_from_config"></a>
8 unmodified lines910111213141529 unmodified lines454647484950518 unmodified linesfrom langchain.vectorstores import Chroma, FAISSfrom langchain.vectorstores.base import VectorStoreRetrieverfrom flows.base_flows import AtomicFlowimport hydra29 unmodified lines:type vector_db: VectorStoreRetriever:param type: The type of the vector store:type type: str:param \**kwargs: Additional arguments to pass to the flow. See :class:`flows.base_flows.AtomicFlow` for more details."""REQUIRED_KEYS_CONFIG = ["type"]8 unmodified lines910111213141529 unmodified lines454647484950518 unmodified linesfrom langchain.vectorstores import Chroma, FAISSfrom langchain.vectorstores.base import VectorStoreRetrieverfrom aiflows.base_flows import AtomicFlowimport hydra29 unmodified lines:type vector_db: VectorStoreRetriever:param type: The type of the vector store:type type: str:param \**kwargs: Additional arguments to pass to the flow. See :class:`aiflows.base_flows.AtomicFlow` for more details."""REQUIRED_KEYS_CONFIG = ["type"]
1 unmodified line23456781 unmodified linedescription: "VectorStoreFlow"backend:_target_: flows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementation1 unmodified line23456781 unmodified linedescription: "VectorStoreFlow"backend:_target_: aiflows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementation
3 unmodified lines45678910111213141516171819202122232425262728293031322 unmodified lines35363738394041424344454 unmodified lines5051525354555657585960616263646566676869707172732 unmodified lines767778798081828384853 unmodified lines- "content"output_interface:- "retrieved"_target_: flows.base_flows.SequentialFlow.instantiate_from_default_configname: "demoChromaDBFlow"description: "An example flow of how to read and writed in a ChromaDBFlowModule."subflows_config:chroma_db:input_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]_target_: aiflows.VectorStoreFlowModule.ChromaDBFlow.instantiate_from_default_configbackend:_target_: flows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationn_results: 1 # number of results to retrieve when querytopology:- goal: Write content to the ChromaDBinput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: chroma_dboutput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_set:operation: "read"keys_to_rename:2 unmodified lines- goal: Read content from the ChromaDBinput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: chroma_dboutput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["retrieved"]vector_store_demo_flow:4 unmodified lines- "retrieved"name: "demoVectorStoreFlow"description: "An example flow of how to read and write in a VectorStoreFlowModule."_target_: flows.base_flows.SequentialFlow.instantiate_from_default_configsubflows_config:vs_db:_target_: aiflows.VectorStoreFlowModule.VectorStoreFlow.instantiate_from_default_configbackend:_target_: flows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationtopology:- goal: Write content to the VectorStoreinput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: vs_dboutput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_set:operation: "read"keys_to_rename:2 unmodified lines- goal: Read content from the VectorStoreinput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: vs_dboutput_interface:_target_: flows.interfaces.KeyInterfacekeys_to_select: ["retrieved"]3 unmodified lines45678910111213141516171819202122232425262728293031322 unmodified lines35363738394041424344454 unmodified lines5051525354555657585960616263646566676869707172732 unmodified lines767778798081828384853 unmodified lines- "content"output_interface:- "retrieved"_target_: aiflows.base_flows.SequentialFlow.instantiate_from_default_configname: "demoChromaDBFlow"description: "An example flow of how to read and writed in a ChromaDBFlowModule."subflows_config:chroma_db:input_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]_target_: flow_modules.aiflows.VectorStoreFlowModule.ChromaDBFlow.instantiate_from_default_configbackend:_target_: aiflows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationn_results: 1 # number of results to retrieve when querytopology:- goal: Write content to the ChromaDBinput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: chroma_dboutput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_set:operation: "read"keys_to_rename:2 unmodified lines- goal: Read content from the ChromaDBinput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: chroma_dboutput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["retrieved"]vector_store_demo_flow:4 unmodified lines- "retrieved"name: "demoVectorStoreFlow"description: "An example flow of how to read and write in a VectorStoreFlowModule."_target_: aiflows.base_flows.SequentialFlow.instantiate_from_default_configsubflows_config:vs_db:_target_: flow_modules.aiflows.VectorStoreFlowModule.VectorStoreFlow.instantiate_from_default_configbackend:_target_: aiflows.backends.llm_lite.LiteLLMBackendapi_infos: ???model_name: "" #Not used in current implementationtopology:- goal: Write content to the VectorStoreinput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: vs_dboutput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_set:operation: "read"keys_to_rename:2 unmodified lines- goal: Read content from the VectorStoreinput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["operation","content"]flow: vs_dboutput_interface:_target_: aiflows.interfaces.KeyInterfacekeys_to_select: ["retrieved"]
2 unmodified lines345678910111213143 unmodified lines181920212223242 unmodified linesimport hydraimport flowsfrom flows.flow_launchers import FlowLauncherfrom flows.utils.general_helpers import read_yaml_filefrom flows.backends.api_info import ApiInfofrom flows import loggingfrom flows.flow_cache import CACHING_PARAMETERS, clear_cacheCACHING_PARAMETERS.do_caching = False # Set to True to enable caching# clear_cache() # Uncomment this line to clear the cache3 unmodified linesdependencies = [{"url": "aiflows/VectorStoreFlowModule", "revision": os.getcwd()},]from flows import flow_verseflow_verse.sync_dependencies(dependencies)if __name__ == "__main__":2 unmodified lines345678910111213143 unmodified lines181920212223242 unmodified linesimport hydraimport aiflowsfrom aiflows.flow_launchers import FlowLauncherfrom aiflows.utils.general_helpers import read_yaml_filefrom aiflows.backends.api_info import ApiInfofrom aiflows import loggingfrom aiflows.flow_cache import CACHING_PARAMETERS, clear_cacheCACHING_PARAMETERS.do_caching = False # Set to True to enable caching# clear_cache() # Uncomment this line to clear the cache3 unmodified linesdependencies = [{"url": "aiflows/VectorStoreFlowModule", "revision": os.getcwd()},]from aiflows import flow_verseflow_verse.sync_dependencies(dependencies)if __name__ == "__main__":
ChromaDBFlow.py+2-2
ChromaDBFlow.yaml+1-1
README.md+3-3
VectorStoreFlow.py+2-2
VectorStoreFlow.yaml+1-1
demo.yaml+15-15
run.py+7-7