trustgraph-flow 0.12.5__tar.gz → 0.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/PKG-INFO +2 -2
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/setup.py +1 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/recursive/chunker.py +1 -9
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/token/chunker.py +1 -9
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/decoding/pdf/pdf_decoder.py +1 -8
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/definitions/extract.py +42 -6
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/relationships/extract.py +63 -30
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/topics/extract.py +6 -3
- trustgraph-flow-0.13.1/trustgraph/flow_version.py +1 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure/llm.py +13 -2
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure_openai/llm.py +11 -2
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/claude/llm.py +7 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/cohere/llm.py +7 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/googleaistudio/llm.py +8 -2
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/llamafile/llm.py +1 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/ollama/llm.py +4 -3
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/openai/llm.py +7 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/cassandra/write.py +9 -8
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/neo4j/write.py +10 -8
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph_flow.egg-info/PKG-INFO +2 -2
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph_flow.egg-info/requires.txt +1 -1
- trustgraph-flow-0.12.5/trustgraph/flow_version.py +0 -1
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/README.md +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/chunker-recursive +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/chunker-token +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/de-query-milvus +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/de-query-qdrant +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/de-write-milvus +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/de-write-qdrant +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/document-rag +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/embeddings-ollama +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/embeddings-vectorize +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/ge-query-milvus +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/ge-query-qdrant +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/ge-write-milvus +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/ge-write-qdrant +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/graph-rag +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/kg-extract-definitions +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/kg-extract-relationships +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/kg-extract-topics +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/metering +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/object-extract-row +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/oe-write-milvus +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/pdf-decoder +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/prompt-generic +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/prompt-template +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/rows-write-cassandra +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/run-processing +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-azure +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-azure-openai +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-claude +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-cohere +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-googleaistudio +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-llamafile +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-ollama +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/text-completion-openai +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/triples-query-cassandra +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/triples-query-neo4j +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/triples-write-cassandra +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/scripts/triples-write-neo4j +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/setup.cfg +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/recursive/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/recursive/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/token/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/chunking/token/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/decoding/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/decoding/pdf/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/decoding/pdf/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/direct/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/direct/cassandra.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/direct/milvus_object_embeddings.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/document_rag.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/ollama/processor.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/vectorize/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/vectorize/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/embeddings/vectorize/vectorize.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/object/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/object/row/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/object/row/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/object/row/extract.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/graph_rag.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/metering/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/metering/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/metering/counter.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/metering/pricelist.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/generic/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/generic/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/generic/prompts.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/generic/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/template/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/template/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/template/prompts.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/prompt/template/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/claude/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/claude/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/googleaistudio/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/googleaistudio/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/openai/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/openai/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/processing/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/processing/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/processing/processing.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/cassandra/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/query/triples/neo4j/service.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/document_rag/rag.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/retrieval/graph_rag/rag.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/object_embeddings/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/object_embeddings/milvus/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/object_embeddings/milvus/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/object_embeddings/milvus/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/rows/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph_flow.egg-info/SOURCES.txt +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
- {trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-flow
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.13.1
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.13.1.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -34,7 +34,7 @@ setuptools.setup(
|
|
34
34
|
python_requires='>=3.8',
|
35
35
|
download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz",
|
36
36
|
install_requires=[
|
37
|
-
"trustgraph-base>=0.
|
37
|
+
"trustgraph-base>=0.13,<0.14",
|
38
38
|
"urllib3",
|
39
39
|
"rdflib",
|
40
40
|
"pymilvus",
|
@@ -63,16 +63,8 @@ class Processor(ConsumerProducer):
|
|
63
63
|
|
64
64
|
for ix, chunk in enumerate(texts):
|
65
65
|
|
66
|
-
id = v.metadata.id + "-c" + str(ix)
|
67
|
-
|
68
66
|
r = Chunk(
|
69
|
-
metadata=
|
70
|
-
source=v.metadata.source,
|
71
|
-
id=id,
|
72
|
-
title=v.metadata.title,
|
73
|
-
user=v.metadata.user,
|
74
|
-
collection=v.metadata.collection,
|
75
|
-
),
|
67
|
+
metadata=v.metadata,
|
76
68
|
chunk=chunk.page_content.encode("utf-8"),
|
77
69
|
)
|
78
70
|
|
@@ -62,16 +62,8 @@ class Processor(ConsumerProducer):
|
|
62
62
|
|
63
63
|
for ix, chunk in enumerate(texts):
|
64
64
|
|
65
|
-
id = v.metadata.id + "-c" + str(ix)
|
66
|
-
|
67
65
|
r = Chunk(
|
68
|
-
metadata=
|
69
|
-
source=v.metadata.source,
|
70
|
-
id=id,
|
71
|
-
title=v.metadata.title,
|
72
|
-
user=v.metadata.user,
|
73
|
-
collection=v.metadata.collection,
|
74
|
-
),
|
66
|
+
metadata=v.metadata,
|
75
67
|
chunk=chunk.page_content.encode("utf-8"),
|
76
68
|
)
|
77
69
|
|
@@ -59,15 +59,8 @@ class Processor(ConsumerProducer):
|
|
59
59
|
|
60
60
|
for ix, page in enumerate(pages):
|
61
61
|
|
62
|
-
id = v.metadata.id + "-p" + str(ix)
|
63
62
|
r = TextDocument(
|
64
|
-
metadata=
|
65
|
-
source=v.metadata.source,
|
66
|
-
title=v.metadata.title,
|
67
|
-
id=id,
|
68
|
-
user=v.metadata.user,
|
69
|
-
collection=v.metadata.collection,
|
70
|
-
),
|
63
|
+
metadata=v.metadata,
|
71
64
|
text=page.page_content.encode("utf-8"),
|
72
65
|
)
|
73
66
|
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/definitions/extract.py
RENAMED
@@ -7,16 +7,18 @@ get entity definitions which are output as graph edges.
|
|
7
7
|
import urllib.parse
|
8
8
|
import json
|
9
9
|
|
10
|
-
from .... schema import ChunkEmbeddings, Triple, Metadata, Value
|
10
|
+
from .... schema import ChunkEmbeddings, Triple, Triples, Metadata, Value
|
11
11
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
12
12
|
from .... schema import prompt_request_queue
|
13
13
|
from .... schema import prompt_response_queue
|
14
14
|
from .... log_level import LogLevel
|
15
15
|
from .... clients.prompt_client import PromptClient
|
16
|
-
from .... rdf import TRUSTGRAPH_ENTITIES, DEFINITION
|
16
|
+
from .... rdf import TRUSTGRAPH_ENTITIES, DEFINITION, RDF_LABEL, SUBJECT_OF
|
17
17
|
from .... base import ConsumerProducer
|
18
18
|
|
19
19
|
DEFINITION_VALUE = Value(value=DEFINITION, is_uri=True)
|
20
|
+
RDF_LABEL_VALUE = Value(value=RDF_LABEL, is_uri=True)
|
21
|
+
SUBJECT_OF_VALUE = Value(value=SUBJECT_OF, is_uri=True)
|
20
22
|
|
21
23
|
module = ".".join(__name__.split(".")[1:-1])
|
22
24
|
|
@@ -44,7 +46,7 @@ class Processor(ConsumerProducer):
|
|
44
46
|
"output_queue": output_queue,
|
45
47
|
"subscriber": subscriber,
|
46
48
|
"input_schema": ChunkEmbeddings,
|
47
|
-
"output_schema":
|
49
|
+
"output_schema": Triples,
|
48
50
|
"prompt_request_queue": pr_request_queue,
|
49
51
|
"prompt_response_queue": pr_response_queue,
|
50
52
|
}
|
@@ -69,9 +71,12 @@ class Processor(ConsumerProducer):
|
|
69
71
|
|
70
72
|
return self.prompt.request_definitions(chunk)
|
71
73
|
|
72
|
-
def
|
74
|
+
def emit_edges(self, metadata, triples):
|
73
75
|
|
74
|
-
t =
|
76
|
+
t = Triples(
|
77
|
+
metadata=metadata,
|
78
|
+
triples=triples,
|
79
|
+
)
|
75
80
|
self.producer.send(t)
|
76
81
|
|
77
82
|
def handle(self, msg):
|
@@ -85,6 +90,13 @@ class Processor(ConsumerProducer):
|
|
85
90
|
|
86
91
|
defs = self.get_definitions(chunk)
|
87
92
|
|
93
|
+
triples = []
|
94
|
+
|
95
|
+
# FIXME: Putting metadata into triples store is duplicated in
|
96
|
+
# relationships extractor too
|
97
|
+
for t in v.metadata.metadata:
|
98
|
+
triples.append(t)
|
99
|
+
|
88
100
|
for defn in defs:
|
89
101
|
|
90
102
|
s = defn.name
|
@@ -101,7 +113,31 @@ class Processor(ConsumerProducer):
|
|
101
113
|
s_value = Value(value=str(s_uri), is_uri=True)
|
102
114
|
o_value = Value(value=str(o), is_uri=False)
|
103
115
|
|
104
|
-
|
116
|
+
triples.append(Triple(
|
117
|
+
s=s_value,
|
118
|
+
p=RDF_LABEL_VALUE,
|
119
|
+
o=Value(value=s, is_uri=False),
|
120
|
+
))
|
121
|
+
|
122
|
+
triples.append(Triple(
|
123
|
+
s=s_value, p=DEFINITION_VALUE, o=o_value
|
124
|
+
))
|
125
|
+
|
126
|
+
triples.append(Triple(
|
127
|
+
s=s_value,
|
128
|
+
p=SUBJECT_OF_VALUE,
|
129
|
+
o=Value(value=v.metadata.id, is_uri=True)
|
130
|
+
))
|
131
|
+
|
132
|
+
self.emit_edges(
|
133
|
+
Metadata(
|
134
|
+
id=v.metadata.id,
|
135
|
+
metadata=[],
|
136
|
+
user=v.metadata.user,
|
137
|
+
collection=v.metadata.collection,
|
138
|
+
),
|
139
|
+
triples
|
140
|
+
)
|
105
141
|
|
106
142
|
except Exception as e:
|
107
143
|
print("Exception: ", e, flush=True)
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/extract/kg/relationships/extract.py
RENAMED
@@ -9,7 +9,7 @@ import urllib.parse
|
|
9
9
|
import os
|
10
10
|
from pulsar.schema import JsonSchema
|
11
11
|
|
12
|
-
from .... schema import ChunkEmbeddings, Triple, GraphEmbeddings
|
12
|
+
from .... schema import ChunkEmbeddings, Triple, Triples, GraphEmbeddings
|
13
13
|
from .... schema import Metadata, Value
|
14
14
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
15
15
|
from .... schema import graph_embeddings_store_queue
|
@@ -17,10 +17,11 @@ from .... schema import prompt_request_queue
|
|
17
17
|
from .... schema import prompt_response_queue
|
18
18
|
from .... log_level import LogLevel
|
19
19
|
from .... clients.prompt_client import PromptClient
|
20
|
-
from .... rdf import RDF_LABEL, TRUSTGRAPH_ENTITIES
|
20
|
+
from .... rdf import RDF_LABEL, TRUSTGRAPH_ENTITIES, SUBJECT_OF
|
21
21
|
from .... base import ConsumerProducer
|
22
22
|
|
23
23
|
RDF_LABEL_VALUE = Value(value=RDF_LABEL, is_uri=True)
|
24
|
+
SUBJECT_OF_VALUE = Value(value=SUBJECT_OF, is_uri=True)
|
24
25
|
|
25
26
|
module = ".".join(__name__.split(".")[1:-1])
|
26
27
|
|
@@ -50,7 +51,7 @@ class Processor(ConsumerProducer):
|
|
50
51
|
"output_queue": output_queue,
|
51
52
|
"subscriber": subscriber,
|
52
53
|
"input_schema": ChunkEmbeddings,
|
53
|
-
"output_schema":
|
54
|
+
"output_schema": Triples,
|
54
55
|
"prompt_request_queue": pr_request_queue,
|
55
56
|
"prompt_response_queue": pr_response_queue,
|
56
57
|
}
|
@@ -69,7 +70,7 @@ class Processor(ConsumerProducer):
|
|
69
70
|
"prompt_response_queue": pr_response_queue,
|
70
71
|
"subscriber": subscriber,
|
71
72
|
"input_schema": ChunkEmbeddings.__name__,
|
72
|
-
"output_schema":
|
73
|
+
"output_schema": Triples.__name__,
|
73
74
|
"vector_schema": GraphEmbeddings.__name__,
|
74
75
|
})
|
75
76
|
|
@@ -92,9 +93,12 @@ class Processor(ConsumerProducer):
|
|
92
93
|
|
93
94
|
return self.prompt.request_relationships(chunk)
|
94
95
|
|
95
|
-
def
|
96
|
+
def emit_edges(self, metadata, triples):
|
96
97
|
|
97
|
-
t =
|
98
|
+
t = Triples(
|
99
|
+
metadata=metadata,
|
100
|
+
triples=triples,
|
101
|
+
)
|
98
102
|
self.producer.send(t)
|
99
103
|
|
100
104
|
def emit_vec(self, metadata, ent, vec):
|
@@ -113,6 +117,13 @@ class Processor(ConsumerProducer):
|
|
113
117
|
|
114
118
|
rels = self.get_relationships(chunk)
|
115
119
|
|
120
|
+
triples = []
|
121
|
+
|
122
|
+
# FIXME: Putting metadata into triples store is duplicated in
|
123
|
+
# relationships extractor too
|
124
|
+
for t in v.metadata.metadata:
|
125
|
+
triples.append(t)
|
126
|
+
|
116
127
|
for rel in rels:
|
117
128
|
|
118
129
|
s = rel.s
|
@@ -139,43 +150,65 @@ class Processor(ConsumerProducer):
|
|
139
150
|
else:
|
140
151
|
o_value = Value(value=str(o), is_uri=False)
|
141
152
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
)
|
153
|
+
triples.append(Triple(
|
154
|
+
s=s_value,
|
155
|
+
p=p_value,
|
156
|
+
o=o_value
|
157
|
+
))
|
148
158
|
|
149
159
|
# Label for s
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
)
|
160
|
+
triples.append(Triple(
|
161
|
+
s=s_value,
|
162
|
+
p=RDF_LABEL_VALUE,
|
163
|
+
o=Value(value=str(s), is_uri=False)
|
164
|
+
))
|
156
165
|
|
157
166
|
# Label for p
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
)
|
167
|
+
triples.append(Triple(
|
168
|
+
s=p_value,
|
169
|
+
p=RDF_LABEL_VALUE,
|
170
|
+
o=Value(value=str(p), is_uri=False)
|
171
|
+
))
|
164
172
|
|
165
173
|
if rel.o_entity:
|
166
174
|
# Label for o
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
175
|
+
triples.append(Triple(
|
176
|
+
s=o_value,
|
177
|
+
p=RDF_LABEL_VALUE,
|
178
|
+
o=Value(value=str(o), is_uri=False)
|
179
|
+
))
|
180
|
+
|
181
|
+
# 'Subject of' for s
|
182
|
+
triples.append(Triple(
|
183
|
+
s=s_value,
|
184
|
+
p=SUBJECT_OF_VALUE,
|
185
|
+
o=Value(value=v.metadata.id, is_uri=True)
|
186
|
+
))
|
187
|
+
|
188
|
+
if rel.o_entity:
|
189
|
+
# 'Subject of' for o
|
190
|
+
triples.append(Triple(
|
191
|
+
s=o_value,
|
192
|
+
p=RDF_LABEL_VALUE,
|
193
|
+
o=Value(value=v.metadata.id, is_uri=True)
|
194
|
+
))
|
173
195
|
|
174
196
|
self.emit_vec(v.metadata, s_value, v.vectors)
|
175
197
|
self.emit_vec(v.metadata, p_value, v.vectors)
|
198
|
+
|
176
199
|
if rel.o_entity:
|
177
200
|
self.emit_vec(v.metadata, o_value, v.vectors)
|
178
201
|
|
202
|
+
self.emit_edges(
|
203
|
+
Metadata(
|
204
|
+
id=v.metadata.id,
|
205
|
+
metadata=[],
|
206
|
+
user=v.metadata.user,
|
207
|
+
collection=v.metadata.collection,
|
208
|
+
),
|
209
|
+
triples
|
210
|
+
)
|
211
|
+
|
179
212
|
except Exception as e:
|
180
213
|
print("Exception: ", e, flush=True)
|
181
214
|
|
@@ -7,7 +7,7 @@ get entity definitions which are output as graph edges.
|
|
7
7
|
import urllib.parse
|
8
8
|
import json
|
9
9
|
|
10
|
-
from .... schema import ChunkEmbeddings, Triple, Metadata, Value
|
10
|
+
from .... schema import ChunkEmbeddings, Triple, Triples, Metadata, Value
|
11
11
|
from .... schema import chunk_embeddings_ingest_queue, triples_store_queue
|
12
12
|
from .... schema import prompt_request_queue
|
13
13
|
from .... schema import prompt_response_queue
|
@@ -44,7 +44,7 @@ class Processor(ConsumerProducer):
|
|
44
44
|
"output_queue": output_queue,
|
45
45
|
"subscriber": subscriber,
|
46
46
|
"input_schema": ChunkEmbeddings,
|
47
|
-
"output_schema":
|
47
|
+
"output_schema": Triples,
|
48
48
|
"prompt_request_queue": pr_request_queue,
|
49
49
|
"prompt_response_queue": pr_response_queue,
|
50
50
|
}
|
@@ -71,7 +71,10 @@ class Processor(ConsumerProducer):
|
|
71
71
|
|
72
72
|
def emit_edge(self, metadata, s, p, o):
|
73
73
|
|
74
|
-
t =
|
74
|
+
t = Triples(
|
75
|
+
metadata=metadata,
|
76
|
+
triples=[Triple(s=s, p=p, o=o)],
|
77
|
+
)
|
75
78
|
self.producer.send(t)
|
76
79
|
|
77
80
|
def handle(self, msg):
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.13.1"
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/azure/llm.py
RENAMED
@@ -7,6 +7,7 @@ serverless endpoint service. Input is prompt, output is response.
|
|
7
7
|
import requests
|
8
8
|
import json
|
9
9
|
from prometheus_client import Histogram
|
10
|
+
import os
|
10
11
|
|
11
12
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
12
13
|
from .... schema import text_completion_request_queue
|
@@ -23,6 +24,8 @@ default_subscriber = module
|
|
23
24
|
default_temperature = 0.0
|
24
25
|
default_max_output = 4192
|
25
26
|
default_model = "AzureAI"
|
27
|
+
default_endpoint = os.getenv("AZURE_ENDPOINT")
|
28
|
+
default_token = os.getenv("AZURE_TOKEN")
|
26
29
|
|
27
30
|
class Processor(ConsumerProducer):
|
28
31
|
|
@@ -31,12 +34,18 @@ class Processor(ConsumerProducer):
|
|
31
34
|
input_queue = params.get("input_queue", default_input_queue)
|
32
35
|
output_queue = params.get("output_queue", default_output_queue)
|
33
36
|
subscriber = params.get("subscriber", default_subscriber)
|
34
|
-
endpoint = params.get("endpoint")
|
35
|
-
token = params.get("token")
|
37
|
+
endpoint = params.get("endpoint", default_endpoint)
|
38
|
+
token = params.get("token", default_token)
|
36
39
|
temperature = params.get("temperature", default_temperature)
|
37
40
|
max_output = params.get("max_output", default_max_output)
|
38
41
|
model = default_model
|
39
42
|
|
43
|
+
if endpoint is None:
|
44
|
+
raise RuntimeError("Azure endpoint not specified")
|
45
|
+
|
46
|
+
if token is None:
|
47
|
+
raise RuntimeError("Azure token not specified")
|
48
|
+
|
40
49
|
super(Processor, self).__init__(
|
41
50
|
**params | {
|
42
51
|
"input_queue": input_queue,
|
@@ -199,11 +208,13 @@ class Processor(ConsumerProducer):
|
|
199
208
|
|
200
209
|
parser.add_argument(
|
201
210
|
'-e', '--endpoint',
|
211
|
+
default=default_endpoint,
|
202
212
|
help=f'LLM model endpoint'
|
203
213
|
)
|
204
214
|
|
205
215
|
parser.add_argument(
|
206
216
|
'-k', '--token',
|
217
|
+
default=default_token,
|
207
218
|
help=f'LLM model token'
|
208
219
|
)
|
209
220
|
|
@@ -8,6 +8,7 @@ import requests
|
|
8
8
|
import json
|
9
9
|
from prometheus_client import Histogram
|
10
10
|
from openai import AzureOpenAI
|
11
|
+
import os
|
11
12
|
|
12
13
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
13
14
|
from .... schema import text_completion_request_queue
|
@@ -24,6 +25,8 @@ default_subscriber = module
|
|
24
25
|
default_temperature = 0.0
|
25
26
|
default_max_output = 4192
|
26
27
|
default_api = "2024-02-15-preview"
|
28
|
+
default_endpoint = os.getenv("AZURE_ENDPOINT")
|
29
|
+
default_token = os.getenv("AZURE_TOKEN")
|
27
30
|
|
28
31
|
class Processor(ConsumerProducer):
|
29
32
|
|
@@ -32,13 +35,19 @@ class Processor(ConsumerProducer):
|
|
32
35
|
input_queue = params.get("input_queue", default_input_queue)
|
33
36
|
output_queue = params.get("output_queue", default_output_queue)
|
34
37
|
subscriber = params.get("subscriber", default_subscriber)
|
35
|
-
endpoint = params.get("endpoint")
|
36
|
-
token = params.get("token")
|
38
|
+
endpoint = params.get("endpoint", default_endpoint)
|
39
|
+
token = params.get("token", default_token)
|
37
40
|
temperature = params.get("temperature", default_temperature)
|
38
41
|
max_output = params.get("max_output", default_max_output)
|
39
42
|
model = params.get("model")
|
40
43
|
api = params.get("api_version", default_api)
|
41
44
|
|
45
|
+
if endpoint is None:
|
46
|
+
raise RuntimeError("Azure endpoint not specified")
|
47
|
+
|
48
|
+
if token is None:
|
49
|
+
raise RuntimeError("Azure token not specified")
|
50
|
+
|
42
51
|
super(Processor, self).__init__(
|
43
52
|
**params | {
|
44
53
|
"input_queue": input_queue,
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/claude/llm.py
RENAMED
@@ -6,6 +6,7 @@ Input is prompt, output is response.
|
|
6
6
|
|
7
7
|
import anthropic
|
8
8
|
from prometheus_client import Histogram
|
9
|
+
import os
|
9
10
|
|
10
11
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
11
12
|
from .... schema import text_completion_request_queue
|
@@ -22,6 +23,7 @@ default_subscriber = module
|
|
22
23
|
default_model = 'claude-3-5-sonnet-20240620'
|
23
24
|
default_temperature = 0.0
|
24
25
|
default_max_output = 8192
|
26
|
+
default_api_key = os.getenv("CLAUDE_KEY")
|
25
27
|
|
26
28
|
class Processor(ConsumerProducer):
|
27
29
|
|
@@ -31,10 +33,13 @@ class Processor(ConsumerProducer):
|
|
31
33
|
output_queue = params.get("output_queue", default_output_queue)
|
32
34
|
subscriber = params.get("subscriber", default_subscriber)
|
33
35
|
model = params.get("model", default_model)
|
34
|
-
api_key = params.get("api_key")
|
36
|
+
api_key = params.get("api_key", default_api_key)
|
35
37
|
temperature = params.get("temperature", default_temperature)
|
36
38
|
max_output = params.get("max_output", default_max_output)
|
37
39
|
|
40
|
+
if api_key is None:
|
41
|
+
raise RuntimeError("Claude API key not specified")
|
42
|
+
|
38
43
|
super(Processor, self).__init__(
|
39
44
|
**params | {
|
40
45
|
"input_queue": input_queue,
|
@@ -175,6 +180,7 @@ class Processor(ConsumerProducer):
|
|
175
180
|
|
176
181
|
parser.add_argument(
|
177
182
|
'-k', '--api-key',
|
183
|
+
default=default_api_key,
|
178
184
|
help=f'Claude API key'
|
179
185
|
)
|
180
186
|
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/cohere/llm.py
RENAMED
@@ -6,6 +6,7 @@ Input is prompt, output is response.
|
|
6
6
|
|
7
7
|
import cohere
|
8
8
|
from prometheus_client import Histogram
|
9
|
+
import os
|
9
10
|
|
10
11
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
11
12
|
from .... schema import text_completion_request_queue
|
@@ -21,6 +22,7 @@ default_output_queue = text_completion_response_queue
|
|
21
22
|
default_subscriber = module
|
22
23
|
default_model = 'c4ai-aya-23-8b'
|
23
24
|
default_temperature = 0.0
|
25
|
+
default_api_key = os.getenv("COHERE_KEY")
|
24
26
|
|
25
27
|
class Processor(ConsumerProducer):
|
26
28
|
|
@@ -30,9 +32,12 @@ class Processor(ConsumerProducer):
|
|
30
32
|
output_queue = params.get("output_queue", default_output_queue)
|
31
33
|
subscriber = params.get("subscriber", default_subscriber)
|
32
34
|
model = params.get("model", default_model)
|
33
|
-
api_key = params.get("api_key")
|
35
|
+
api_key = params.get("api_key", default_api_key)
|
34
36
|
temperature = params.get("temperature", default_temperature)
|
35
37
|
|
38
|
+
if api_key is None:
|
39
|
+
raise RuntimeError("Cohere API key not specified")
|
40
|
+
|
36
41
|
super(Processor, self).__init__(
|
37
42
|
**params | {
|
38
43
|
"input_queue": input_queue,
|
@@ -162,6 +167,7 @@ class Processor(ConsumerProducer):
|
|
162
167
|
|
163
168
|
parser.add_argument(
|
164
169
|
'-k', '--api-key',
|
170
|
+
default=default_api_key,
|
165
171
|
help=f'Cohere API key'
|
166
172
|
)
|
167
173
|
|
@@ -7,6 +7,7 @@ Input is prompt, output is response.
|
|
7
7
|
import google.generativeai as genai
|
8
8
|
from google.generativeai.types import HarmCategory, HarmBlockThreshold
|
9
9
|
from prometheus_client import Histogram
|
10
|
+
import os
|
10
11
|
|
11
12
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
12
13
|
from .... schema import text_completion_request_queue
|
@@ -23,6 +24,7 @@ default_subscriber = module
|
|
23
24
|
default_model = 'gemini-1.5-flash-002'
|
24
25
|
default_temperature = 0.0
|
25
26
|
default_max_output = 8192
|
27
|
+
default_api_key = os.getenv("GOOGLE_AI_STUDIO_KEY")
|
26
28
|
|
27
29
|
class Processor(ConsumerProducer):
|
28
30
|
|
@@ -32,10 +34,13 @@ class Processor(ConsumerProducer):
|
|
32
34
|
output_queue = params.get("output_queue", default_output_queue)
|
33
35
|
subscriber = params.get("subscriber", default_subscriber)
|
34
36
|
model = params.get("model", default_model)
|
35
|
-
api_key = params.get("api_key")
|
37
|
+
api_key = params.get("api_key", default_api_key)
|
36
38
|
temperature = params.get("temperature", default_temperature)
|
37
39
|
max_output = params.get("max_output", default_max_output)
|
38
40
|
|
41
|
+
if api_key is None:
|
42
|
+
raise RuntimeError("Google AI Studio API key not specified")
|
43
|
+
|
39
44
|
super(Processor, self).__init__(
|
40
45
|
**params | {
|
41
46
|
"input_queue": input_queue,
|
@@ -190,6 +195,7 @@ class Processor(ConsumerProducer):
|
|
190
195
|
|
191
196
|
parser.add_argument(
|
192
197
|
'-k', '--api-key',
|
198
|
+
default=default_api_key,
|
193
199
|
help=f'GoogleAIStudio API key'
|
194
200
|
)
|
195
201
|
|
@@ -211,4 +217,4 @@ def run():
|
|
211
217
|
|
212
218
|
Processor.start(module, __doc__)
|
213
219
|
|
214
|
-
|
220
|
+
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/llamafile/llm.py
RENAMED
@@ -20,7 +20,7 @@ default_input_queue = text_completion_request_queue
|
|
20
20
|
default_output_queue = text_completion_response_queue
|
21
21
|
default_subscriber = module
|
22
22
|
default_model = 'LLaMA_CPP'
|
23
|
-
default_llamafile =
|
23
|
+
default_llamafile = os.getenv("LLAMAFILE_URL", "http://localhost:8080/v1")
|
24
24
|
default_temperature = 0.0
|
25
25
|
default_max_output = 4096
|
26
26
|
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/ollama/llm.py
RENAMED
@@ -6,6 +6,7 @@ Input is prompt, output is response.
|
|
6
6
|
|
7
7
|
from ollama import Client
|
8
8
|
from prometheus_client import Histogram, Info
|
9
|
+
import os
|
9
10
|
|
10
11
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
11
12
|
from .... schema import text_completion_request_queue
|
@@ -19,8 +20,8 @@ module = ".".join(__name__.split(".")[1:-1])
|
|
19
20
|
default_input_queue = text_completion_request_queue
|
20
21
|
default_output_queue = text_completion_response_queue
|
21
22
|
default_subscriber = module
|
22
|
-
default_model = 'gemma2'
|
23
|
-
default_ollama = 'http://localhost:11434'
|
23
|
+
default_model = 'gemma2:9b'
|
24
|
+
default_ollama = os.getenv("OLLAMA_HOST", 'http://localhost:11434')
|
24
25
|
|
25
26
|
class Processor(ConsumerProducer):
|
26
27
|
|
@@ -152,7 +153,7 @@ class Processor(ConsumerProducer):
|
|
152
153
|
parser.add_argument(
|
153
154
|
'-m', '--model',
|
154
155
|
default="gemma2",
|
155
|
-
help=f'LLM model (default:
|
156
|
+
help=f'LLM model (default: {default_model})'
|
156
157
|
)
|
157
158
|
|
158
159
|
parser.add_argument(
|
{trustgraph-flow-0.12.5 → trustgraph-flow-0.13.1}/trustgraph/model/text_completion/openai/llm.py
RENAMED
@@ -6,6 +6,7 @@ Input is prompt, output is response.
|
|
6
6
|
|
7
7
|
from openai import OpenAI
|
8
8
|
from prometheus_client import Histogram
|
9
|
+
import os
|
9
10
|
|
10
11
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
11
12
|
from .... schema import text_completion_request_queue
|
@@ -22,6 +23,7 @@ default_subscriber = module
|
|
22
23
|
default_model = 'gpt-3.5-turbo'
|
23
24
|
default_temperature = 0.0
|
24
25
|
default_max_output = 4096
|
26
|
+
default_api_key = os.getenv("OPENAI_KEY")
|
25
27
|
|
26
28
|
class Processor(ConsumerProducer):
|
27
29
|
|
@@ -31,10 +33,13 @@ class Processor(ConsumerProducer):
|
|
31
33
|
output_queue = params.get("output_queue", default_output_queue)
|
32
34
|
subscriber = params.get("subscriber", default_subscriber)
|
33
35
|
model = params.get("model", default_model)
|
34
|
-
api_key = params.get("api_key")
|
36
|
+
api_key = params.get("api_key", default_api_key)
|
35
37
|
temperature = params.get("temperature", default_temperature)
|
36
38
|
max_output = params.get("max_output", default_max_output)
|
37
39
|
|
40
|
+
if api_key is None:
|
41
|
+
raise RuntimeError("OpenAI API key not specified")
|
42
|
+
|
38
43
|
super(Processor, self).__init__(
|
39
44
|
**params | {
|
40
45
|
"input_queue": input_queue,
|
@@ -185,6 +190,7 @@ class Processor(ConsumerProducer):
|
|
185
190
|
|
186
191
|
parser.add_argument(
|
187
192
|
'-k', '--api-key',
|
193
|
+
default=default_api_key,
|
188
194
|
help=f'OpenAI API key'
|
189
195
|
)
|
190
196
|
|