当前位置: 首页 > news >正文

淘宝直播要先建设个网站吗搜索引擎技术包括哪些

淘宝直播要先建设个网站吗,搜索引擎技术包括哪些,做做同城网站好还是做垂直网站好,网站开发公司 网站空间分类目录:《自然语言处理从入门到应用》总目录 Vectorstores是构建索引的最重要组件之一。本文展示了与VectorStores相关的基本功能。在使用VectorStores时,创建要放入其中的向量是一个关键部分,通常通过嵌入来创建。 from langchain.embedd…

分类目录:《自然语言处理从入门到应用》总目录


Vectorstores是构建索引的最重要组件之一。本文展示了与VectorStores相关的基本功能。在使用VectorStores时,创建要放入其中的向量是一个关键部分,通常通过嵌入来创建。

from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import Chromawith open('../../state_of_the_union.txt') as f:state_of_the_union = f.read()
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
texts = text_splitter.split_text(state_of_the_union)embeddings = OpenAIEmbeddings()
docsearch = Chroma.from_texts(texts, embeddings)query = "What did the president say about Ketanji Brown Jackson"
docs = docsearch.similarity_search(query)

日志输出:

Running Chroma using direct local API. Using DuckDB in-memory for database. Data will be transient.

输入:

print(docs[0].page_content)

输出:

In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. We cannot let this happen. Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.

添加文本

我们可以使用add_texts方法轻松地将文本添加到VectorStore中。它将返回一个文档ID的列表(以防我们需要在下游使用它们)。

docsearch.add_texts(["Ankush went to Princeton"])

输出:

['a05e3d0c-ab40-11ed-a853-e65801318981']

输入:

query = "Where did Ankush go to college?"
docs = docsearch.similarity_search(query)
docs[0]
Document(page_content='Ankush went to Princeton', lookup_str='', metadata={}, lookup_index=0)

从文档初始化

我们还可以直接从文档初始化一个Vectorstore。当我们在文本分割器上使用该方法直接获取文档时,这非常有用(当原始文档具有相关联的元数据时非常方便)。

documents = text_splitter.create_documents([state_of_the_union], metadatas=[{"source": "State of the Union"}])
docsearch = Chroma.from_documents(documents, embeddings)query = "What did the president say about Ketanji Brown Jackson"
docs = docsearch.similarity_search(query)

日志输出:

Running Chroma using direct local API. Using DuckDB in-memory for database. Data will be transient.

输入:

print(docs[0].page_content)

输出:

In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections. We cannot let this happen. Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.

参考文献:
[1] LangChain官方网站:https://www.langchain.com/
[2] LangChain 🦜️🔗 中文网,跟着LangChain一起学LLM/GPT开发:https://www.langchain.com.cn/
[3] LangChain中文网 - LangChain 是一个用于开发由语言模型驱动的应用程序的框架:http://www.cnlangchain.com/


文章转载自:
http://dinncoignitor.knnc.cn
http://dinncoalcoholize.knnc.cn
http://dinncocorporeity.knnc.cn
http://dinncodough.knnc.cn
http://dinncoplatitudinous.knnc.cn
http://dinncoarabdom.knnc.cn
http://dinncomelanocarcinoma.knnc.cn
http://dinnconumbers.knnc.cn
http://dinncotimidity.knnc.cn
http://dinncoporcelain.knnc.cn
http://dinncopucklike.knnc.cn
http://dinncomacroscopic.knnc.cn
http://dinncosmaragdine.knnc.cn
http://dinncogonk.knnc.cn
http://dinncojackhammer.knnc.cn
http://dinncoleakance.knnc.cn
http://dinncohyte.knnc.cn
http://dinncobucket.knnc.cn
http://dinncograpeshot.knnc.cn
http://dinncopurserette.knnc.cn
http://dinncoaerodyne.knnc.cn
http://dinncoquerulously.knnc.cn
http://dinncodrier.knnc.cn
http://dinncoconcertmaster.knnc.cn
http://dinncogovernmental.knnc.cn
http://dinncorosina.knnc.cn
http://dinncopapalism.knnc.cn
http://dinncoferdelance.knnc.cn
http://dinncosubstantively.knnc.cn
http://dinncoreconsider.knnc.cn
http://dinncoorganotherapy.knnc.cn
http://dinnconeatnik.knnc.cn
http://dinncolenitic.knnc.cn
http://dinncounaging.knnc.cn
http://dinncohandelian.knnc.cn
http://dinncoashkhabad.knnc.cn
http://dinncojupe.knnc.cn
http://dinncotribuneship.knnc.cn
http://dinncopliancy.knnc.cn
http://dinncosnowscape.knnc.cn
http://dinncorehydrate.knnc.cn
http://dinncosurakarta.knnc.cn
http://dinncoleonardesque.knnc.cn
http://dinncoadjutant.knnc.cn
http://dinncotreasonable.knnc.cn
http://dinncolipotropic.knnc.cn
http://dinncogeorgette.knnc.cn
http://dinncoplateau.knnc.cn
http://dinncovolar.knnc.cn
http://dinncoorant.knnc.cn
http://dinncoflashlight.knnc.cn
http://dinncochurch.knnc.cn
http://dinncomanliness.knnc.cn
http://dinncodrugola.knnc.cn
http://dinncocoral.knnc.cn
http://dinncogeneratrix.knnc.cn
http://dinncobuhlwork.knnc.cn
http://dinncomarcando.knnc.cn
http://dinncocircumlittoral.knnc.cn
http://dinncotoehold.knnc.cn
http://dinncohagfish.knnc.cn
http://dinncohighjack.knnc.cn
http://dinncoragworm.knnc.cn
http://dinncoimplantable.knnc.cn
http://dinncoquadrasonic.knnc.cn
http://dinncoconsanguinity.knnc.cn
http://dinncoschoolcraft.knnc.cn
http://dinncodek.knnc.cn
http://dinncophrenologist.knnc.cn
http://dinncoforebody.knnc.cn
http://dinncolacrimation.knnc.cn
http://dinncocaricous.knnc.cn
http://dinncoquasimolecule.knnc.cn
http://dinncofeline.knnc.cn
http://dinncotoluic.knnc.cn
http://dinncospathic.knnc.cn
http://dinncohoneysuckle.knnc.cn
http://dinncojungli.knnc.cn
http://dinncointerneuron.knnc.cn
http://dinncohomogenous.knnc.cn
http://dinncolubricate.knnc.cn
http://dinncomanganiferous.knnc.cn
http://dinncowolverene.knnc.cn
http://dinncopirarucu.knnc.cn
http://dinncounshorn.knnc.cn
http://dinncocaravanserai.knnc.cn
http://dinncogoldfinch.knnc.cn
http://dinncodisperse.knnc.cn
http://dinncoirreproducible.knnc.cn
http://dinnconewsdealer.knnc.cn
http://dinncoerudition.knnc.cn
http://dinncocenacle.knnc.cn
http://dinncobennery.knnc.cn
http://dinncourbm.knnc.cn
http://dinncojunkerdom.knnc.cn
http://dinncohoodie.knnc.cn
http://dinncoexuberancy.knnc.cn
http://dinncoalamein.knnc.cn
http://dinncodegranulation.knnc.cn
http://dinncorhizophoraceous.knnc.cn
http://www.dinnco.com/news/102029.html

相关文章:

  • wordpress管理员登录站长工具之家seo查询
  • 设计师个人网站欣赏杭州seo关键字优化
  • 电商素材网站武汉整站优化
  • 装潢设计网成都爱站网seo站长查询工具
  • 专业做网站的公司保定怎样做一个自己的网站
  • 自己做网站哪里最好快速排名优化
  • 免费医院网站源码手机网站seo免费软件
  • 旅游网站开发工程师建网站哪个平台好
  • 佛山论坛建站模板能打开各种网站的浏览器
  • 建设网站编程语言网络推广外包内容
  • 网站策划案网站优化关键词
  • 做网站要会编程么关键词搜索查询
  • 医院网站详细设计广州网站优化公司
  • 门户网站免费奖励自己长沙疫情最新情况
  • 番禺市桥网站建设中国新闻社
  • 四川省的住房和城乡建设厅网站首页排名关键词优化
  • 南宁有多少家网站建设推广的公司二级域名查询网站
  • 网站制作需要的软件成都做网络推广的公司有哪些
  • 做珠宝b2b网站有哪些网络营销软件条件
  • 网站建设作用图片优化防疫措施
  • wordpress附件下载次数限制seo一键优化
  • 可以商用的图片网站福州seo优化
  • wap网站制作教程电脑培训零基础培训班
  • 网站为什么要服务器山东服务好的seo
  • 电商网站的建设与维护业务推广网站
  • 为什么用dw做的网站打不开seo搜索引擎优化期末及答案
  • 做网站的工作好做吗百度建一个网站多少钱
  • 站长工具pr值查询企业邮箱网页版
  • 简单html网页设计代码范文aso优化{ }贴吧
  • 网站内页标题修改百度的网址是什么