From e53f59f01a2d5020e4a3248380d7a04891c8be1f Mon Sep 17 00:00:00 2001 From: Zeyang Lin <4020306+linzeyang@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:24:05 +0800 Subject: [PATCH] DOCS: doc-string - langchain.vectorstores.dashvector.DashVector (#13502) - **Description:** There are several mistakes in the sample code in the doc-string of `DashVector` class, and this pull request aims to correct them. The correction code has been tested against latest version (at the time of creation of this pull request) of: `langchain==0.0.336` `dashvector==1.0.6` . - **Issue:** No issue is created for this. - **Dependencies:** No dependency is required for this change, - **Twitter handle:** `zeyanglin` --- libs/langchain/langchain/vectorstores/dashvector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/langchain/langchain/vectorstores/dashvector.py b/libs/langchain/langchain/vectorstores/dashvector.py index 618b2be4523..51b8ed7ff31 100644 --- a/libs/langchain/langchain/vectorstores/dashvector.py +++ b/libs/langchain/langchain/vectorstores/dashvector.py @@ -29,15 +29,15 @@ class DashVector(VectorStore): Example: .. code-block:: python - from langchain.vectorstores import dashvector + from langchain.vectorstores import DashVector from langchain.embeddings.openai import OpenAIEmbeddings import dashvector - client = dashvector.Client.init(api_key="***") - client.create("langchain") + client = dashvector.Client(api_key="***") + client.create("langchain", dimension=1024) collection = client.get("langchain") embeddings = OpenAIEmbeddings() - vectorstore = Dashvector(collection, embeddings.embed_query, "text") + vectorstore = DashVector(collection, embeddings.embed_query, "text") """ def __init__(