diff --git a/examples/amazon_s3_embedding/main.py b/examples/amazon_s3_embedding/main.py index 98c89061..b3740583 100644 --- a/examples/amazon_s3_embedding/main.py +++ b/examples/amazon_s3_embedding/main.py @@ -61,7 +61,7 @@ def amazon_s3_text_embedding_flow( doc_embeddings.export( "doc_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["filename", "location"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -74,7 +74,7 @@ def amazon_s3_text_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the amazon_s3_text_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( amazon_s3_text_embedding_flow, "doc_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/amazon_s3_embedding/pyproject.toml b/examples/amazon_s3_embedding/pyproject.toml index e9562439..9de3cc2b 100644 --- a/examples/amazon_s3_embedding/pyproject.toml +++ b/examples/amazon_s3_embedding/pyproject.toml @@ -3,7 +3,7 @@ name = "amazon-s3-text-embedding" version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on Amazon S3 files." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42", "python-dotenv>=1.0.1"] +dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"] [tool.setuptools] packages = [] diff --git a/examples/code_embedding/main.py b/examples/code_embedding/main.py index 577bc8e6..0a5773a7 100644 --- a/examples/code_embedding/main.py +++ b/examples/code_embedding/main.py @@ -60,7 +60,7 @@ def code_embedding_flow( code_embeddings.export( "code_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["filename", "location"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -73,7 +73,7 @@ def code_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the code_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( code_embedding_flow, "code_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/code_embedding/pyproject.toml b/examples/code_embedding/pyproject.toml index 4f2ce236..c8e11eee 100644 --- a/examples/code_embedding/pyproject.toml +++ b/examples/code_embedding/pyproject.toml @@ -3,7 +3,7 @@ name = "code-embedding" version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on source code." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42", "python-dotenv>=1.0.1"] +dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"] [tool.setuptools] packages = [] diff --git a/examples/docs_to_knowledge_graph/README.md b/examples/docs_to_knowledge_graph/README.md index affea9c1..8143d35f 100644 --- a/examples/docs_to_knowledge_graph/README.md +++ b/examples/docs_to_knowledge_graph/README.md @@ -14,12 +14,12 @@ Please drop [Cocoindex on Github](https://github.com/cocoindex-io/cocoindex) a s ## Prerequisite * [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one. -* Install [Neo4j](https://cocoindex.io/docs/ops/storages#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/storages#kuzu-dev-instance) if you don't have one. +* Install [Neo4j](https://cocoindex.io/docs/ops/targets#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) if you don't have one. * The example uses Neo4j by default for now. If you want to use Kuzu, find out the "SELECT ONE GRAPH DATABASE TO USE" section and switch the active branch. * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). ## Documentation -You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/storages#property-graph-targets). +You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/targets#property-graph-targets). ## Run @@ -48,7 +48,7 @@ cocoindex update main.py After the knowledge graph is built, you can explore the knowledge graph. * If you're using Neo4j, you can open the explorer at [http://localhost:7474](http://localhost:7474), with username `neo4j` and password `cocoindex`. -* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/storages#kuzu-dev-instance) for more details. +* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) for more details. You can run the following Cypher query to get all relationships: diff --git a/examples/docs_to_knowledge_graph/main.py b/examples/docs_to_knowledge_graph/main.py index b73274d5..d10b8955 100644 --- a/examples/docs_to_knowledge_graph/main.py +++ b/examples/docs_to_knowledge_graph/main.py @@ -7,7 +7,7 @@ neo4j_conn_spec = cocoindex.add_auth_entry( "Neo4jConnection", - cocoindex.storages.Neo4jConnection( + cocoindex.targets.Neo4jConnection( uri="bolt://localhost:7687", user="neo4j", password="cocoindex", @@ -15,7 +15,7 @@ ) kuzu_conn_spec = cocoindex.add_auth_entry( "KuzuConnection", - cocoindex.storages.KuzuConnection( + cocoindex.targets.KuzuConnection( api_server_url="http://localhost:8123", ), ) @@ -25,15 +25,15 @@ # Please make sure only one branch is live and others are commented out. # Use Neo4j -GraphDbSpec = cocoindex.storages.Neo4j -GraphDbConnection = cocoindex.storages.Neo4jConnection -GraphDbDeclaration = cocoindex.storages.Neo4jDeclaration +GraphDbSpec = cocoindex.targets.Neo4j +GraphDbConnection = cocoindex.targets.Neo4jConnection +GraphDbDeclaration = cocoindex.targets.Neo4jDeclaration conn_spec = neo4j_conn_spec # Use Kuzu -# GraphDbSpec = cocoindex.storages.Kuzu -# GraphDbConnection = cocoindex.storages.KuzuConnection -# GraphDbDeclaration = cocoindex.storages.KuzuDeclaration +# GraphDbSpec = cocoindex.targets.Kuzu +# GraphDbConnection = cocoindex.targets.KuzuConnection +# GraphDbDeclaration = cocoindex.targets.KuzuDeclaration # conn_spec = kuzu_conn_spec @@ -134,7 +134,7 @@ def docs_to_kg_flow( document_node.export( "document_node", GraphDbSpec( - connection=conn_spec, mapping=cocoindex.storages.Nodes(label="Document") + connection=conn_spec, mapping=cocoindex.targets.Nodes(label="Document") ), primary_key_fields=["filename"], ) @@ -150,20 +150,20 @@ def docs_to_kg_flow( "entity_relationship", GraphDbSpec( connection=conn_spec, - mapping=cocoindex.storages.Relationships( + mapping=cocoindex.targets.Relationships( rel_type="RELATIONSHIP", - source=cocoindex.storages.NodeFromFields( + source=cocoindex.targets.NodeFromFields( label="Entity", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="subject", target="value" ), ], ), - target=cocoindex.storages.NodeFromFields( + target=cocoindex.targets.NodeFromFields( label="Entity", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="object", target="value" ), ], @@ -176,16 +176,16 @@ def docs_to_kg_flow( "entity_mention", GraphDbSpec( connection=conn_spec, - mapping=cocoindex.storages.Relationships( + mapping=cocoindex.targets.Relationships( rel_type="MENTION", - source=cocoindex.storages.NodeFromFields( + source=cocoindex.targets.NodeFromFields( label="Document", - fields=[cocoindex.storages.TargetFieldMapping("filename")], + fields=[cocoindex.targets.TargetFieldMapping("filename")], ), - target=cocoindex.storages.NodeFromFields( + target=cocoindex.targets.NodeFromFields( label="Entity", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="entity", target="value" ) ], diff --git a/examples/docs_to_knowledge_graph/pyproject.toml b/examples/docs_to_knowledge_graph/pyproject.toml index cf73e3da..6a170403 100644 --- a/examples/docs_to_knowledge_graph/pyproject.toml +++ b/examples/docs_to_knowledge_graph/pyproject.toml @@ -3,7 +3,7 @@ name = "manuals-to-kg" version = "0.1.0" description = "Simple example for cocoindex: extract triples from files and build knowledge graph." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42"] +dependencies = ["cocoindex>=0.1.52"] [tool.setuptools] packages = [] diff --git a/examples/fastapi_server_docker/main.py b/examples/fastapi_server_docker/main.py index bdc502d7..752e2436 100644 --- a/examples/fastapi_server_docker/main.py +++ b/examples/fastapi_server_docker/main.py @@ -54,7 +54,7 @@ def markdown_embedding_flow( doc_embeddings.export( "doc_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["filename", "location"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -67,7 +67,7 @@ def markdown_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the text_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( markdown_embedding_flow, "doc_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/fastapi_server_docker/requirements.txt b/examples/fastapi_server_docker/requirements.txt index d535633f..d64dcf4a 100644 --- a/examples/fastapi_server_docker/requirements.txt +++ b/examples/fastapi_server_docker/requirements.txt @@ -1,4 +1,4 @@ -cocoindex>=0.1.42 +cocoindex>=0.1.52 python-dotenv>=1.0.1 fastapi==0.115.12 fastapi-cli==0.0.7 diff --git a/examples/gdrive_text_embedding/main.py b/examples/gdrive_text_embedding/main.py index 5fcde61e..c9b7b630 100644 --- a/examples/gdrive_text_embedding/main.py +++ b/examples/gdrive_text_embedding/main.py @@ -60,7 +60,7 @@ def gdrive_text_embedding_flow( doc_embeddings.export( "doc_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["filename", "location"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -73,7 +73,7 @@ def gdrive_text_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the gdrive_text_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( gdrive_text_embedding_flow, "doc_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/gdrive_text_embedding/pyproject.toml b/examples/gdrive_text_embedding/pyproject.toml index 5b702ff7..90c49893 100644 --- a/examples/gdrive_text_embedding/pyproject.toml +++ b/examples/gdrive_text_embedding/pyproject.toml @@ -3,7 +3,7 @@ name = "gdrive-text-embedding" version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on Google Drive files." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42", "python-dotenv>=1.0.1"] +dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"] [tool.setuptools] packages = [] diff --git a/examples/image_search/main.py b/examples/image_search/main.py index 85d5fcbd..04d889be 100644 --- a/examples/image_search/main.py +++ b/examples/image_search/main.py @@ -81,7 +81,7 @@ def image_object_embedding_flow( img_embeddings.export( "img_embeddings", - cocoindex.storages.Qdrant(collection_name=QDRANT_COLLECTION), + cocoindex.targets.Qdrant(collection_name=QDRANT_COLLECTION), primary_key_fields=["id"], ) diff --git a/examples/image_search/pyproject.toml b/examples/image_search/pyproject.toml index 53d431d3..d5b1f113 100644 --- a/examples/image_search/pyproject.toml +++ b/examples/image_search/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on images." requires-python = ">=3.11" dependencies = [ - "cocoindex>=0.1.42", + "cocoindex>=0.1.52", "python-dotenv>=1.0.1", "fastapi>=0.100.0", "torch>=2.0.0", diff --git a/examples/image_search/requirements.txt b/examples/image_search/requirements.txt index d701794a..0a359dc8 100644 --- a/examples/image_search/requirements.txt +++ b/examples/image_search/requirements.txt @@ -1,4 +1,4 @@ -cocoindex>=0.1.42 +cocoindex>=0.1.52 python-dotenv>=1.0.1 requests>=2.31.0 uvicorn>=0.29.0 diff --git a/examples/manuals_llm_extraction/main.py b/examples/manuals_llm_extraction/main.py index 17be9713..e35a7700 100644 --- a/examples/manuals_llm_extraction/main.py +++ b/examples/manuals_llm_extraction/main.py @@ -131,6 +131,6 @@ def manual_extraction_flow( modules_index.export( "modules", - cocoindex.storages.Postgres(table_name="modules_info"), + cocoindex.targets.Postgres(table_name="modules_info"), primary_key_fields=["filename"], ) diff --git a/examples/manuals_llm_extraction/pyproject.toml b/examples/manuals_llm_extraction/pyproject.toml index e0b21b0b..cf830172 100644 --- a/examples/manuals_llm_extraction/pyproject.toml +++ b/examples/manuals_llm_extraction/pyproject.toml @@ -3,7 +3,7 @@ name = "manuals-llm-extraction" version = "0.1.0" description = "Simple example for cocoindex: extract structured information from a Markdown file using LLM." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42", "marker-pdf>=1.5.2"] +dependencies = ["cocoindex>=0.1.52", "marker-pdf>=1.5.2"] [tool.setuptools] packages = [] diff --git a/examples/pdf_embedding/main.py b/examples/pdf_embedding/main.py index b637e884..29c69b8d 100644 --- a/examples/pdf_embedding/main.py +++ b/examples/pdf_embedding/main.py @@ -86,7 +86,7 @@ def pdf_embedding_flow( pdf_embeddings.export( "pdf_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["id"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -99,7 +99,7 @@ def pdf_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the pdf_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( pdf_embedding_flow, "pdf_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/pdf_embedding/pyproject.toml b/examples/pdf_embedding/pyproject.toml index 891aef14..8043a074 100644 --- a/examples/pdf_embedding/pyproject.toml +++ b/examples/pdf_embedding/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on local PDF files." requires-python = ">=3.11" dependencies = [ - "cocoindex>=0.1.42", + "cocoindex>=0.1.52", "python-dotenv>=1.0.1", "marker-pdf>=1.5.2", ] diff --git a/examples/product_recommendation/README.md b/examples/product_recommendation/README.md index c97dd298..256d13d4 100644 --- a/examples/product_recommendation/README.md +++ b/examples/product_recommendation/README.md @@ -9,12 +9,12 @@ Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a s ## Prerequisite * [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one. -* Install [Neo4j](https://cocoindex.io/docs/ops/storages#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/storages#kuzu-dev-instance) if you don't have one. +* Install [Neo4j](https://cocoindex.io/docs/ops/targets#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) if you don't have one. * The example uses Neo4j by default for now. If you want to use Kuzu, find out the "SELECT ONE GRAPH DATABASE TO USE" section and switch the active branch. * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). ## Documentation -You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/storages#property-graph-targets). +You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/targets#property-graph-targets). ## Run @@ -43,7 +43,7 @@ cocoindex update main.py After the knowledge graph is built, you can explore the knowledge graph. * If you're using Neo4j, you can open the explorer at [http://localhost:7474](http://localhost:7474), with username `neo4j` and password `cocoindex`. -* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/storages#kuzu-dev-instance) for more details. +* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) for more details. You can run the following Cypher query to get all relationships: diff --git a/examples/product_recommendation/main.py b/examples/product_recommendation/main.py index 7c0c328f..4c2b9123 100644 --- a/examples/product_recommendation/main.py +++ b/examples/product_recommendation/main.py @@ -9,7 +9,7 @@ neo4j_conn_spec = cocoindex.add_auth_entry( "Neo4jConnection", - cocoindex.storages.Neo4jConnection( + cocoindex.targets.Neo4jConnection( uri="bolt://localhost:7687", user="neo4j", password="cocoindex", @@ -17,7 +17,7 @@ ) kuzu_conn_spec = cocoindex.add_auth_entry( "KuzuConnection", - cocoindex.storages.KuzuConnection( + cocoindex.targets.KuzuConnection( api_server_url="http://localhost:8123", ), ) @@ -27,15 +27,15 @@ # Please make sure only one branch is live and others are commented out. # Use Neo4j -GraphDbSpec = cocoindex.storages.Neo4j -GraphDbConnection = cocoindex.storages.Neo4jConnection -GraphDbDeclaration = cocoindex.storages.Neo4jDeclaration +GraphDbSpec = cocoindex.targets.Neo4j +GraphDbConnection = cocoindex.targets.Neo4jConnection +GraphDbDeclaration = cocoindex.targets.Neo4jDeclaration conn_spec = neo4j_conn_spec # Use Kuzu -# GraphDbSpec = cocoindex.storages.Kuzu -# GraphDbConnection = cocoindex.storages.KuzuConnection -# GraphDbDeclaration = cocoindex.storages.KuzuDeclaration +# GraphDbSpec = cocoindex.targets.Kuzu +# GraphDbConnection = cocoindex.targets.KuzuConnection +# GraphDbDeclaration = cocoindex.targets.KuzuDeclaration # conn_spec = kuzu_conn_spec @@ -157,7 +157,7 @@ def store_product_flow( product_node.export( "product_node", GraphDbSpec( - connection=conn_spec, mapping=cocoindex.storages.Nodes(label="Product") + connection=conn_spec, mapping=cocoindex.targets.Nodes(label="Product") ), primary_key_fields=["id"], ) @@ -174,20 +174,20 @@ def store_product_flow( "product_taxonomy", GraphDbSpec( connection=conn_spec, - mapping=cocoindex.storages.Relationships( + mapping=cocoindex.targets.Relationships( rel_type="PRODUCT_TAXONOMY", - source=cocoindex.storages.NodeFromFields( + source=cocoindex.targets.NodeFromFields( label="Product", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="product_id", target="id" ), ], ), - target=cocoindex.storages.NodeFromFields( + target=cocoindex.targets.NodeFromFields( label="Taxonomy", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="taxonomy", target="value" ), ], @@ -200,20 +200,20 @@ def store_product_flow( "product_complementary_taxonomy", GraphDbSpec( connection=conn_spec, - mapping=cocoindex.storages.Relationships( + mapping=cocoindex.targets.Relationships( rel_type="PRODUCT_COMPLEMENTARY_TAXONOMY", - source=cocoindex.storages.NodeFromFields( + source=cocoindex.targets.NodeFromFields( label="Product", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="product_id", target="id" ), ], ), - target=cocoindex.storages.NodeFromFields( + target=cocoindex.targets.NodeFromFields( label="Taxonomy", fields=[ - cocoindex.storages.TargetFieldMapping( + cocoindex.targets.TargetFieldMapping( source="taxonomy", target="value" ), ], diff --git a/examples/product_recommendation/pyproject.toml b/examples/product_recommendation/pyproject.toml index 8553b663..330a249a 100644 --- a/examples/product_recommendation/pyproject.toml +++ b/examples/product_recommendation/pyproject.toml @@ -3,7 +3,7 @@ name = "cocoindex-ecommerce-taxonomy" version = "0.1.0" description = "Simple example for CocoIndex: extract taxonomy from e-commerce products and build knowledge graph." requires-python = ">=3.11" -dependencies = ["cocoindex>=0.1.42", "jinja2>=3.1.6"] +dependencies = ["cocoindex>=0.1.52", "jinja2>=3.1.6"] [tool.setuptools] packages = [] diff --git a/examples/text_embedding/Text_Embedding.ipynb b/examples/text_embedding/Text_Embedding.ipynb index 341bff83..2b27966f 100644 --- a/examples/text_embedding/Text_Embedding.ipynb +++ b/examples/text_embedding/Text_Embedding.ipynb @@ -272,7 +272,7 @@ "\n", "def search(pool: ConnectionPool, query: str, top_k: int = 5):\n", " # Get the table name, for the export target in the text_embedding_flow above.\n", - " table_name = cocoindex.utils.get_target_storage_default_name(text_embedding_flow, \"doc_embeddings\")\n", + " table_name = cocoindex.utils.get_target_default_name(text_embedding_flow, \"doc_embeddings\")\n", " # Evaluate the transform flow defined above with the input query, to get the embedding.\n", " query_vector = text_to_embedding.eval(query)\n", " # Run the query and get the results.\n", diff --git a/examples/text_embedding/main.py b/examples/text_embedding/main.py index 6cfc6e73..6799d852 100644 --- a/examples/text_embedding/main.py +++ b/examples/text_embedding/main.py @@ -54,7 +54,7 @@ def text_embedding_flow( doc_embeddings.export( "doc_embeddings", - cocoindex.storages.Postgres(), + cocoindex.targets.Postgres(), primary_key_fields=["filename", "location"], vector_indexes=[ cocoindex.VectorIndexDef( @@ -67,7 +67,7 @@ def text_embedding_flow( def search(pool: ConnectionPool, query: str, top_k: int = 5): # Get the table name, for the export target in the text_embedding_flow above. - table_name = cocoindex.utils.get_target_storage_default_name( + table_name = cocoindex.utils.get_target_default_name( text_embedding_flow, "doc_embeddings" ) # Evaluate the transform flow defined above with the input query, to get the embedding. diff --git a/examples/text_embedding/pyproject.toml b/examples/text_embedding/pyproject.toml index 6da834f6..72277175 100644 --- a/examples/text_embedding/pyproject.toml +++ b/examples/text_embedding/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on local text files." requires-python = ">=3.11" dependencies = [ - "cocoindex>=0.1.42", + "cocoindex>=0.1.52", "python-dotenv>=1.0.1", "pgvector>=0.4.1", "psycopg[binary,pool]", diff --git a/examples/text_embedding_qdrant/README.md b/examples/text_embedding_qdrant/README.md index 3727e99f..82739524 100644 --- a/examples/text_embedding_qdrant/README.md +++ b/examples/text_embedding_qdrant/README.md @@ -2,7 +2,7 @@ [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) -CocoIndex supports Qdrant natively - [documentation](https://cocoindex.io/docs/ops/storages#qdrant). In this example, we will build index flow from text embedding from local markdown files, and query the index. We will use **Qdrant** as the vector database. +CocoIndex supports Qdrant natively - [documentation](https://cocoindex.io/docs/ops/targets#qdrant). In this example, we will build index flow from text embedding from local markdown files, and query the index. We will use **Qdrant** as the vector database. We appreciate a star ⭐ at [CocoIndex Github](https://github.com/cocoindex-io/cocoindex) if this is helpful. diff --git a/examples/text_embedding_qdrant/main.py b/examples/text_embedding_qdrant/main.py index b63ddfe6..b22f3e3f 100644 --- a/examples/text_embedding_qdrant/main.py +++ b/examples/text_embedding_qdrant/main.py @@ -56,7 +56,7 @@ def text_embedding_flow( doc_embeddings.export( "doc_embeddings", - cocoindex.storages.Qdrant(collection_name=QDRANT_COLLECTION), + cocoindex.targets.Qdrant(collection_name=QDRANT_COLLECTION), primary_key_fields=["id"], ) diff --git a/examples/text_embedding_qdrant/pyproject.toml b/examples/text_embedding_qdrant/pyproject.toml index e905f764..ec2e8cad 100644 --- a/examples/text_embedding_qdrant/pyproject.toml +++ b/examples/text_embedding_qdrant/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "Simple example for cocoindex: build embedding index based on local text files." requires-python = ">=3.11" dependencies = [ - "cocoindex>=0.1.42", + "cocoindex>=0.1.52", "python-dotenv>=1.0.1", "qdrant-client>=1.6.0", ]