GithubHelp home page GithubHelp logo

Comments (14)

shanghaikid avatar shanghaikid commented on May 30, 2024 1

I will add an example in the repo's doc for those who like to use langchain.js tomorrow.

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024 1

why?
there are my parameter
export const address =
'https://in01-c664772af99277c.aws-us-west-2.vectordb.zillizcloud.com:19532';
export const username = 'ttc'; // optional username
export const password = 'Ttc.zilliz'; // optional password
export const ssl = true; // secure or not

I know. I just reviewed the langchain code, zilliz cloud doesn't support the index type used in langchain.

I will contribute a zilliz vector store in langchain.js.

Anyway, langchain is just a chain tool, you can archive your target without it and in a more controllable way.

  1. get embedding from openAI's api
  2. insert embedding into milvus
  3. search with milvus

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024

ok, let me check this later today.

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024

Hi, if you are using langchain, you shouldn't create the collection via https://github.com/zilliztech/cloud-vectordb-examples/blob/master/node/HelloZillizCloud.js

Because in the helloZillizCloud, it defines the schema and create a collection in advanced.
But langchain.js does this for you. all you need is a milvus cluster address, langchain's fromDocuments function will insert embeddings into that predefined collection for you.

And the schema defined in helloZillizCloud is different from langchain's.

This data format is for zilliz Cloud example, not for langchain.

[
{ id: 2, word_count: 24, book_intro: Math.floor(Math.random() * 1000) },
{ id: 1, word_count: 4, book_intro: Math.floor(Math.random() * 1000) },
{ id: 3, word_count: 6, book_intro: Math.floor(Math.random() * 1000) },
{ id: 4, word_count: 2, book_intro: Math.floor(Math.random() * 1000) },
{ id: 5, word_count: 9, book_intro: Math.floor(Math.random() * 1000) },
]

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I will add an example in the repo's doc for those who like to use langchain.js tomorrow.

hi, where is the example?

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024

I will add an example in the repo's doc for those who like to use langchain.js tomorrow.

hi, where is the example?

https://github.com/milvus-io/milvus-sdk-node/tree/main/example/LangChain

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I will add an example in the repo's doc for those who like to use langchain.js tomorrow.

hi, where is the example?

https://github.com/milvus-io/milvus-sdk-node/tree/main/example/LangChain

thank you!

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I will add an example in the repo's doc for those who like to use langchain.js tomorrow.

hi, where is the example?

https://github.com/milvus-io/milvus-sdk-node/tree/main/example/LangChain

I used the example above and got the following error. I am using Zilliz Cloud.

Error: ErrorCode: UnexpectedError. Reason: index doesn't exist, collectionID 441713954587545704

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I found that there were no successfully built indexes on the Zilliz console, and after manually creating them, the problem was solved. ‘Metric Type’ needs to be manually selected. I chose ‘L2’.
Why is that?
image

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024

I found that there were no successfully built indexes on the Zilliz console, and after manually creating them, the problem was solved. ‘Metric Type’ needs to be manually selected. I chose ‘L2’. Why is that? image

Maybe you can try a new collection to see if it is working. not the old name 'books'.

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I found that there were no successfully built indexes on the Zilliz console, and after manually creating them, the problem was solved. ‘Metric Type’ needs to be manually selected. I chose ‘L2’. Why is that? image

Maybe you can try a new collection to see if it is working. not the old name 'books'.
yes,this is a new collection. you can try to use zilliz cloud
image

from milvus-sdk-node.

shanghaikid avatar shanghaikid commented on May 30, 2024

I found that there were no successfully built indexes on the Zilliz console, and after manually creating them, the problem was solved. ‘Metric Type’ needs to be manually selected. I chose ‘L2’. Why is that? image

Maybe you can try a new collection to see if it is working. not the old name 'books'.
yes,this is a new collection. you can try to use zilliz cloud
image

I tested it's working. it's weird.
image
image

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

I found that there were no successfully built indexes on the Zilliz console, and after manually creating them, the problem was solved. ‘Metric Type’ needs to be manually selected. I chose ‘L2’. Why is that? image

Maybe you can try a new collection to see if it is working. not the old name 'books'.
yes,this is a new collection. you can try to use zilliz cloud
image

I tested it's working. it's weird. image image

why?
there are my parameter
export const address =
'https://in01-c664772af99277c.aws-us-west-2.vectordb.zillizcloud.com:19532';
export const username = 'ttc'; // optional username
export const password = 'Ttc.zilliz'; // optional password
export const ssl = true; // secure or not

from milvus-sdk-node.

DeeWooo avatar DeeWooo commented on May 30, 2024

why? 为什么?
there are my parameter有我的参数
export const address =导出常量地址 =
'https://in01-c664772af99277c.aws-us-west-2.vectordb.zillizcloud.com:19532';“https://in01-c664772af99277c.aws-us-west-2.vectordb.zillizcloud.com:19532”;
export const username = 'ttc'; // optional username导出常量用户名 = 'TTC';可选用户名
export const password = 'Ttc.zilliz'; // optional password导出常量密码 = 'Ttc.zilliz';可选密码
export const ssl = true; // secure or not导出常量 SSL = 真;安全与否

I know. I just reviewed the langchain code, zilliz cloud doesn't support the index type used in langchain.我知道。我刚刚查看了语言链代码,zilliz 云不支持语言链中使用的索引类型。

I will contribute a zilliz vector store in langchain.js.我将在 langchain.js 中贡献一个 zilliz 向量存储。

Anyway, langchain is just a chain tool, you can archive your target without it and in a more controllable way.无论如何,langchain 只是一个链工具,您可以在没有它的情况下以更可控的方式存档目标。

  1. get embedding from openAI's api从OpenAI的API获取嵌入
  2. insert embedding into milvus将嵌入插入 milvus
  3. search with milvus 使用米尔维斯搜索

ok
i understand

from milvus-sdk-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.