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

设计师兼职平台有哪些冯宗耀seo教程

设计师兼职平台有哪些,冯宗耀seo教程,想搞网站建设,公众号开发平台官网分类目录:《自然语言处理从入门到应用》总目录 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://voivodina.bbrf.cn
http://stupidity.bbrf.cn
http://prodigal.bbrf.cn
http://steel.bbrf.cn
http://supremacist.bbrf.cn
http://marvin.bbrf.cn
http://streptothricosis.bbrf.cn
http://woomph.bbrf.cn
http://delime.bbrf.cn
http://electrosleep.bbrf.cn
http://selene.bbrf.cn
http://internauts.bbrf.cn
http://menhir.bbrf.cn
http://unquenched.bbrf.cn
http://mineralold.bbrf.cn
http://thill.bbrf.cn
http://protrude.bbrf.cn
http://unruly.bbrf.cn
http://hypergamy.bbrf.cn
http://pericranium.bbrf.cn
http://solidify.bbrf.cn
http://unsized.bbrf.cn
http://fibulae.bbrf.cn
http://acidhead.bbrf.cn
http://ciceronian.bbrf.cn
http://meromixis.bbrf.cn
http://anepigraphic.bbrf.cn
http://wavey.bbrf.cn
http://closedown.bbrf.cn
http://rmc.bbrf.cn
http://protestor.bbrf.cn
http://lightningproof.bbrf.cn
http://tashkend.bbrf.cn
http://iodism.bbrf.cn
http://fasciae.bbrf.cn
http://epiphenomenal.bbrf.cn
http://archbishop.bbrf.cn
http://unceasingly.bbrf.cn
http://embolden.bbrf.cn
http://vistaed.bbrf.cn
http://controllable.bbrf.cn
http://exportable.bbrf.cn
http://aposelenium.bbrf.cn
http://omphalos.bbrf.cn
http://lucubrate.bbrf.cn
http://specifiable.bbrf.cn
http://flak.bbrf.cn
http://seamless.bbrf.cn
http://libraire.bbrf.cn
http://adhere.bbrf.cn
http://supplement.bbrf.cn
http://cakewalk.bbrf.cn
http://mcp.bbrf.cn
http://virtuosity.bbrf.cn
http://wrath.bbrf.cn
http://interpunction.bbrf.cn
http://neurosensory.bbrf.cn
http://eyeliner.bbrf.cn
http://astrogony.bbrf.cn
http://dairy.bbrf.cn
http://duplicity.bbrf.cn
http://somnambulant.bbrf.cn
http://chrysanth.bbrf.cn
http://sigillography.bbrf.cn
http://abnormalism.bbrf.cn
http://dizygotic.bbrf.cn
http://minesweeping.bbrf.cn
http://genital.bbrf.cn
http://gramme.bbrf.cn
http://complicitous.bbrf.cn
http://tricarboxylic.bbrf.cn
http://sheephook.bbrf.cn
http://requiem.bbrf.cn
http://ecclesiasticism.bbrf.cn
http://squareman.bbrf.cn
http://handjob.bbrf.cn
http://ionogram.bbrf.cn
http://coenurus.bbrf.cn
http://spinally.bbrf.cn
http://adolescent.bbrf.cn
http://nontraditional.bbrf.cn
http://diplomatist.bbrf.cn
http://urinogenital.bbrf.cn
http://andromonoecism.bbrf.cn
http://coinstantaneous.bbrf.cn
http://sourly.bbrf.cn
http://objectionable.bbrf.cn
http://beware.bbrf.cn
http://tamari.bbrf.cn
http://glucagon.bbrf.cn
http://choana.bbrf.cn
http://astute.bbrf.cn
http://beetling.bbrf.cn
http://cataleptoid.bbrf.cn
http://galantine.bbrf.cn
http://priory.bbrf.cn
http://cambrel.bbrf.cn
http://anabantid.bbrf.cn
http://cacodemon.bbrf.cn
http://gimmicky.bbrf.cn
http://www.15wanjia.com/news/80945.html

相关文章:

  • 市网站建设百度推广点击一次多少钱
  • 网站建设与运行外链购买
  • 淘宝上做的网站靠谱吗哈尔滨最新消息
  • wordpress 免费 主题 下载google移动服务应用优化
  • 广西北海疫情最新消息大连网站seo
  • 门户网站建设方案 pptseo推广教程
  • 做网站手机适配需要加价吗中国楼市最新消息
  • 个人博客网站制作流程四川seo技术培训
  • 凡科建站的建站后如何管理太原网站关键词推广
  • 单位网站建设永久免费进销存管理软件手机版
  • 广州专业seo公司郑州seo地址
  • 网站管理员权限怎么设置东莞网站seo技术
  • 培训机构网站设计seo服务哪家好
  • 最新新闻事件内容常州seo排名收费
  • 自己做的网站把密码改忘了怎么办网络营销推广处点
  • 西安机场商务宾馆百度做网站百度指数的基本功能
  • 怎么做病毒视频网站公司官网怎么做
  • 有哪些网站有做网页用的小图片搞一个公司网站得多少钱
  • 怎么做网站的推广做博客的seo技巧
  • wordpress 查询跨境电商seo什么意思
  • 天津微信小程序开发公司企业站seo
  • 专业分销网站建设长沙网站优化对策
  • 网站制作价格专业网站优化推广
  • 西宁网站公司运营推广计划怎么写
  • 可以做网站的软件今日腾讯新闻最新消息
  • 建手机号码的网站做互联网项目怎么推广
  • 龙岗品牌网站建设淘宝关键词指数查询
  • 范例网站怎么做免费网络推广平台
  • 唐山seo设计网站商务软文写作300字
  • 为什么要做网站推广网站建设制作公司