NSDT工具推荐Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器 - REVIT导出3D模型插件 - 3D模型语义搜索引擎 - AI模型在线查看 - Three.js虚拟轴心开发包 - 3D模型在线减面 - STL模型在线切割 - 3D道路快速建模

如今,似乎所有应用程序的名称中都有“Chat”或“GPT”。 新发布的应用程序包括 ChatPDF(用于与 PDF 文件聊天)、ArvixGPT(用于与 arXiv 论文——学术文章聊天)和 GPT for Sheets and Docs(将 ChatGPT 引入 Google Sheets™ 和 Docs™)等等,其中新的应用程序每天都会发布。

你有没有想过这些应用程序如何能够与超过 100 页甚至 1,000 页长的文档聊天,而如果你尝试使用 ChatGPT 做同样的事情,会收到这样的错误消息?

这与 OpenAI GPT-3 API 没有什么不同,你会收到这样的错误消息。

简短的回答是,他们将超过 100 页甚至 1,000 页长的文档转换为数据和相关上下文的数字表示(矢量嵌入),并将它们存储在矢量搜索引擎中。 当用户与文档聊天(即提问)时,系统使用称为近似最近邻搜索 (ANN:Approximate Nearest Neighbor) 的算法搜索并返回与问题(即聊天)相似的文本。 它看起来像这样。

然后,该程序在提示中包含类似于问题(即聊天)的返回文本,并再次向 OpenAI GPT-3 API 询问相同的问题。 这将返回你习惯使用 ChatGPT 的良好响应。 这种方法的好处是提示要小得多,不是 1,000 页的文档,用户得到他们正在寻找的答案。

附带一提,如果你担心像 ChatGPT 这样的东西会为问题提供错误的答案,那么可以将其指向你组织的知识库并从那里提供答案。 答案的准确性将与你的知识库一样好。

1、教程

该领域的专家可以更好地解释这些技术的复杂性,所以让我们继续学习如何使用 OpenAI ChatGPT API 和文本嵌入来实现与文档聊天。

2、工具

我们将在本教程中使用三个工具:

  • OpenAI GPT-3,特别是新的 ChatGPT API (gpt-3.5-turbo)。 不是因为这个模型比其他模型好,而是因为它更便宜($0.002 / 1K 代币)并且足以满足这个用例。
  • Chroma,AI原生开源嵌入数据库(即矢量搜索引擎)。 当与 LangChain 结合使用时,Chroma 是一个易于使用的矢量数据库; 否则,它有点无法使用。 如果你想在生产中部署这些类型的应用程序,我建议使用 Elasticsearch,因为它已被广泛采用并且已经存在多年。 并不是因为 Elasticsearch 比竞争对手更好,而是因为没有多少组织喜欢添加新的技术堆栈。
  • LangChain 是一个库,旨在帮助开发人员构建使用大型语言模型 (LLM) 的应用程序,允许他们将这些模型与其他计算或知识来源集成。

3、数据

我们将使用古腾堡计划的“莎士比亚的罗密欧与朱丽叶”中的数据,其中包含 55,985 个token。 这使它成为一个大小适中的数据集。

4、Python代码

代码是使用 Google Colab 开发的。 我喜欢使用 Google Colab,因为它可以让你轻松复制教程,但某些代码可能仅与 Google Colab 相关。

安装 Python 包:

%%writefile requirements.txt
openai
chromadb
langchain
tiktoken
%pip install -r requirements.txt

引入Python包:

import os
import platform

import openai
import chromadb
import langchain

from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
from langchain.text_splitter import TokenTextSplitter
from langchain.llms import OpenAI
from langchain.chains import ChatVectorDBChain
from langchain.document_loaders import GutenbergLoader

print('Python: ', platform.python_version())

在Colab中加载Google Drive:

from google.colab import drive
drive.mount('/content/drive')

设置OpenAI的API key:

os.environ["OPENAI_API_KEY"] = 'your openai api key'

5、配置Chroma

Chroma 在后端使用了我最喜欢的两种技术——DuckDB 和 Apache Parquet——但默认情况下,它使用内存数据库。 这对于本教程来说很好,但我想为你提供将数据库文件存储在磁盘上的选项,这样你就可以重复使用该数据库,而无需每次都为嵌入它进行处理。

persist_directory="/content/drive/My Drive/Colab Notebooks/chroma/romeo"

6、将文档转换为嵌入

将文档(即书籍)转换为矢量嵌入并将其存储在矢量搜索引擎(即矢量数据库)中。

def get_gutenberg(url):
    loader = GutenbergLoader(url)
    data = loader.load()
    return data
romeoandjuliet_data = get_gutenberg('https://www.gutenberg.org/cache/epub/1513/pg1513.txt')

text_splitter = TokenTextSplitter(chunk_size=1000, chunk_overlap=0)
romeoandjuliet_doc = text_splitter.split_documents(romeoandjuliet_data)

embeddings = OpenAIEmbeddings()
vectordb = Chroma.from_documents(romeoandjuliet_doc, embeddings, persist_directory=persist_directory)
vectordb.persist()

这需要一些解释。

第一步有点不言自明,它使用 from langchain.document_loaders import GutenbergLoader 从 Project Gutenberg 加载一本书。

第二步更复杂。 要获得嵌入,我们需要将文本字符串(即书籍)连同嵌入模型 ID 的选择一起发送到 OpenAI 的嵌入 API 端点,例如 text-embedding-ada-002。 响应将包含嵌入。

然而,由于这本书包含 55,985 个标记,而 text-embedding-ada-002 模型的标记限制为 2,048 个标记,我们使用 text_splitter实用程序( langchain.text_splitter import TokenTextSplitter)将本书拆分为可管理的 1,000 个token块。 以下是来自 OpenAI 的示例嵌入响应的说明。 如果您好奇的话,OpenAI嵌入模型的定价是 0.0004 美元/1K  token。

第三步非常简单:我们将嵌入存储在我们的矢量搜索引擎 Chroma 中,并将其保存在文件系统中。

7、配置 LangChain QA

要使用 Chroma 配置 LangChain QA,请使用 OpenAI GPT-3 模型(model_name='gpt-3.5-turbo')并确保响应包括矢量搜索引擎结果的中间步骤,即 Chroma(设置 return_source_documents= True)。

romeoandjuliet_qa = ChatVectorDBChain.from_llm(OpenAI(temperature=0, model_name="gpt-3.5-turbo"), vectordb, return_source_documents=True)

8、《罗密欧与朱丽叶》的问答

从书中生成问题和答案是一个简单的过程。 为了评估结果的准确性,我会将答案与 SparkNotes 中的答案进行比较。

SparkNotes 编辑器。 “罗密欧与朱丽叶”SparkNotes.com,SparkNotes LLC,2005 年,链接

问题 #1:罗密欧与朱丽叶一起过夜了吗?

query = "Have Romeo and Juliet spent the night together? Provide a verbose answer, referencing passages from the book."
result = romeoandjuliet_qa({"question": query, "chat_history": chat_history})

矢量搜索引擎结果 #1

result["source_documents"]
[Document(page_content='Think true love acted simple modesty.\r\n\n\nCome, night, come Romeo; come, thou day in night;\r\n\n\nFor thou wilt lie upon the wings of night\r\n\n\nWhiter than new snow upon a raven’s back.\r\n\n\nCome gentle night, come loving black-brow’d night,\r\n\n\nGive me my Romeo, and when I shall die,\r\n\n\nTake him and cut him out in little stars,\r\n\n\nAnd he will make the face of heaven so fine\r\n\n\nThat all the world will be in love with night,\r\n\n\nAnd pay no worship to the garish sun.\r\n\n\nO, I have bought the mansion of a love,\r\n\n\nBut not possess’d it; and though I am sold,\r\n\n\nNot yet enjoy’d. So tedious is this day\r\n\n\nAs is the night before some festival\r\n\n\nTo an impatient child that hath new robes\r\n\n\nAnd may not wear them. O, here comes my Nurse,\r\n\n\nAnd she brings news, and every tongue that speaks\r\n\n\nBut Romeo’s name speaks heavenly eloquence.\r\n\n\n\r\n\n\n Enter Nurse, with cords.\r\n\n\n\r\n\n\nNow, Nurse, what news? What hast thou there?\r\n\n\nThe cords that Romeo bid thee fetch?\r\n\n\n\r\n\n\nNURSE.\r\n\n\nAy, ay, the cords.\r\n\n\n\r\n\n\n [_Throws them down._]\r\n\n\n\r\n\n\nJULIET.', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='Full half an hour.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nGo with me to the vault.\r\n\n\n\r\n\n\nBALTHASAR.\r\n\n\nI dare not, sir;\r\n\n\nMy master knows not but I am gone hence,\r\n\n\nAnd fearfully did menace me with death\r\n\n\nIf I did stay to look on his intents.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nStay then, I’ll go alone. Fear comes upon me.\r\n\n\nO, much I fear some ill unlucky thing.\r\n\n\n\r\n\n\nBALTHASAR.\r\n\n\nAs I did sleep under this yew tree here,\r\n\n\nI dreamt my master and another fought,\r\n\n\nAnd that my master slew him.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nRomeo! [_Advances._]\r\n\n\nAlack, alack, what blood is this which stains\r\n\n\nThe stony entrance of this sepulchre?\r\n\n\nWhat mean these masterless and gory swords\r\n\n\nTo lie discolour’d by this place of peace?\r\n\n\n\r\n\n\n [_Enters the monument._]\r\n\n\n\r\n\n\nRomeo! O, pale! Who else? What, Paris too?\r\n\n\nAnd steep’d in blood? Ah what an unkind hour\r\n\n\nIs guilty of this lamentable chance?\r\n\n\nThe lady stirs.\r\n\n\n\r\n\n\n [_Juliet wakes and stirs._]\r\n\n\n\r\n\n\nJULIET.\r\n\n\nO comfortable Friar, where is my lord?\r\n\n\nI do remember well where I should be,\r\n\n\nAnd there I am. Where is my Romeo?', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='So shall you share all that he doth possess,\r\n\n\nBy having him, making yourself no less.\r\n\n\n\r\n\n\nNURSE.\r\n\n\nNo less, nay bigger. Women grow by men.\r\n\n\n\r\n\n\nLADY CAPULET.\r\n\n\nSpeak briefly, can you like of Paris’ love?\r\n\n\n\r\n\n\nJULIET.\r\n\n\nI’ll look to like, if looking liking move:\r\n\n\nBut no more deep will I endart mine eye\r\n\n\nThan your consent gives strength to make it fly.\r\n\n\n\r\n\n\n Enter a Servant.\r\n\n\n\r\n\n\nSERVANT.\r\n\n\nMadam, the guests are come, supper served up, you called, my young lady\r\n\n\nasked for, the Nurse cursed in the pantry, and everything in extremity.\r\n\n\nI must hence to wait, I beseech you follow straight.\r\n\n\n\r\n\n\nLADY CAPULET.\r\n\n\nWe follow thee.\r\n\n\n\r\n\n\n [_Exit Servant._]\r\n\n\n\r\n\n\nJuliet, the County stays.\r\n\n\n\r\n\n\nNURSE.\r\n\n\nGo, girl, seek happy nights to happy days.\r\n\n\n\r\n\n\n [_Exeunt._]\r\n\n\n\r\n\n\nSCENE IV. A Street.\r\n\n\n\r\n\n\n Enter Romeo, Mercutio, Benvolio, with five or six Maskers;\r\n\n\n Torch-bearers and others.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nWhat, shall this speech be spoke for our excuse?\r\n\n\nOr shall we on without apology?\r\n\n\n\r\n\n\nBENVOLIO.\r\n\n\nThe date is out of such prolixity:', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='Now comes the wanton blood up in your cheeks,\r\n\n\nThey’ll be in scarlet straight at any news.\r\n\n\nHie you to church. I must another way,\r\n\n\nTo fetch a ladder by the which your love\r\n\n\nMust climb a bird’s nest soon when it is dark.\r\n\n\nI am the drudge, and toil in your delight;\r\n\n\nBut you shall bear the burden soon at night.\r\n\n\nGo. I’ll to dinner; hie you to the cell.\r\n\n\n\r\n\n\nJULIET.\r\n\n\nHie to high fortune! Honest Nurse, farewell.\r\n\n\n\r\n\n\n [_Exeunt._]\r\n\n\n\r\n\n\nSCENE VI. Friar Lawrence’s Cell.\r\n\n\n\r\n\n\n Enter Friar Lawrence and Romeo.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nSo smile the heavens upon this holy act\r\n\n\nThat after-hours with sorrow chide us not.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nAmen, amen, but come what sorrow can,\r\n\n\nIt cannot countervail the exchange of joy\r\n\n\nThat one short minute gives me in her sight.\r\n\n\nDo thou but close our hands with holy words,\r\n\n\nThen love-devouring death do what he dare,\r\n\n\nIt is enough I may but call her mine.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nThese violent delights have violent ends,\r\n\n\nAnd in their triumph die; like fire and powder,', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0)]

OpenAI 答案 #1

result["answer"]

从给定的上下文中不清楚罗密欧和朱丽叶是否一起过夜。 提供的段落没有明确说明它们是否有。 然而,有一些线索表明他们可能在一起度过了一段时间。

在第三幕第二场中,朱丽叶说:“给我我的罗密欧,等我死了,把他带走,把他切成小星星。” 这表明她最近与罗密欧共度时光,并且深深地爱着他。

在第三幕的后期,第五场,罗密欧和朱丽叶在共度时光后互相告别。 朱丽叶告诉罗密欧“向好运”,护士告诉朱丽叶“寻找快乐的夜晚到快乐的日子”。 这些短语表明他们可能一起过夜,但没有明确说明。

在第二幕第六场中,罗密欧与朱丽叶在劳伦斯修士的牢房里相会结婚。 这一幕发生在白天,所以他们不太可能在婚礼前一起过夜。

总的来说,尚不清楚罗密欧和朱丽叶是否在一起过夜,但有一些迹象表明他们可能在一起过夜。

SparkNote#1

SparkNotes 编辑。 “罗密欧与朱丽叶”SparkNotes.com,SparkNotes LLC,2005 年,链接

在第三幕第五场的开头,罗密欧和朱丽叶在黎明前一起躺在朱丽叶的床上,彼此共度了一夜,不愿分开。 我们可能会得出结论,我们的意思是推断他们刚刚发生了关系,这可能是场景最常见的理解方式。
但是,我们无法具体了解他们做了什么,只能知道他们很享受。 他们是否发生关系可能很重要的一个原因是,根据天主教教义,婚姻在圆房之前并不完全有效,而圆房具体指的是以可能怀孕的方式发生关系。 如果婚姻未完成,他们的父母仍然可以取消婚姻。
然而,罗密欧与朱丽叶并没有谈论他们在婚姻或其永久方面的经历,而是专注于他们当下的感受强度:朱丽叶希望罗密欧再多呆一会儿,否认这样一个事实 天快亮了,罗密欧说他宁愿留下来被处死,也不愿离开。
就像罗密欧与朱丽叶初次见面时的对话采用十四行诗的形式一样,他们在这里关于不愿分离的对话采用一种叫做 aubade 的诗歌形式,其中恋人哀叹黎明前分离的必要性——尽管在 传统的 aubade 恋人必须分开,因为他们有关系并且不会被抓住。

问题 2:罗莎琳是谁?

query = "Who is Rosaline? Provide a verbose answer, referencing passages from the book."
result = romeoandjuliet_qa({"question": query, "chat_history": chat_history})

矢量搜索引擎结果 #2

result["source_documents"]
[Document(page_content='We met, we woo’d, and made exchange of vow,\r\n\n\nI’ll tell thee as we pass; but this I pray,\r\n\n\nThat thou consent to marry us today.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nHoly Saint Francis! What a change is here!\r\n\n\nIs Rosaline, that thou didst love so dear,\r\n\n\nSo soon forsaken? Young men’s love then lies\r\n\n\nNot truly in their hearts, but in their eyes.\r\n\n\nJesu Maria, what a deal of brine\r\n\n\nHath wash’d thy sallow cheeks for Rosaline!\r\n\n\nHow much salt water thrown away in waste,\r\n\n\nTo season love, that of it doth not taste.\r\n\n\nThe sun not yet thy sighs from heaven clears,\r\n\n\nThy old groans yet ring in mine ancient ears.\r\n\n\nLo here upon thy cheek the stain doth sit\r\n\n\nOf an old tear that is not wash’d off yet.\r\n\n\nIf ere thou wast thyself, and these woes thine,\r\n\n\nThou and these woes were all for Rosaline,\r\n\n\nAnd art thou chang’d? Pronounce this sentence then,\r\n\n\nWomen may fall, when there’s no strength in men.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nThou chidd’st me oft for loving Rosaline.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nFor doting, not for loving, pupil mine.\r\n\n\n\r\n\n\nROMEO.', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='A fair assembly. [_Gives back the paper_] Whither should they come?\r\n\n\n\r\n\n\nSERVANT.\r\n\n\nUp.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nWhither to supper?\r\n\n\n\r\n\n\nSERVANT.\r\n\n\nTo our house.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nWhose house?\r\n\n\n\r\n\n\nSERVANT.\r\n\n\nMy master’s.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nIndeed I should have ask’d you that before.\r\n\n\n\r\n\n\nSERVANT.\r\n\n\nNow I’ll tell you without asking. My master is the great rich Capulet,\r\n\n\nand if you be not of the house of Montagues, I pray come and crush a\r\n\n\ncup of wine. Rest you merry.\r\n\n\n\r\n\n\n [_Exit._]\r\n\n\n\r\n\n\nBENVOLIO.\r\n\n\nAt this same ancient feast of Capulet’s\r\n\n\nSups the fair Rosaline whom thou so lov’st;\r\n\n\nWith all the admired beauties of Verona.\r\n\n\nGo thither and with unattainted eye,\r\n\n\nCompare her face with some that I shall show,\r\n\n\nAnd I will make thee think thy swan a crow.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nWhen the devout religion of mine eye\r\n\n\nMaintains such falsehood, then turn tears to fire;\r\n\n\nAnd these who, often drown’d, could never die,\r\n\n\nTransparent heretics, be burnt for liars.\r\n\n\nOne fairer than my love? The all-seeing sun', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='Our Romeo hath not been in bed tonight.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nThat last is true; the sweeter rest was mine.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nGod pardon sin. Wast thou with Rosaline?\r\n\n\n\r\n\n\nROMEO.\r\n\n\nWith Rosaline, my ghostly father? No.\r\n\n\nI have forgot that name, and that name’s woe.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nThat’s my good son. But where hast thou been then?\r\n\n\n\r\n\n\nROMEO.\r\n\n\nI’ll tell thee ere thou ask it me again.\r\n\n\nI have been feasting with mine enemy,\r\n\n\nWhere on a sudden one hath wounded me\r\n\n\nThat’s by me wounded. Both our remedies\r\n\n\nWithin thy help and holy physic lies.\r\n\n\nI bear no hatred, blessed man; for lo,\r\n\n\nMy intercession likewise steads my foe.\r\n\n\n\r\n\n\nFRIAR LAWRENCE.\r\n\n\nBe plain, good son, and homely in thy drift;\r\n\n\nRiddling confession finds but riddling shrift.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nThen plainly know my heart’s dear love is set\r\n\n\nOn the fair daughter of rich Capulet.\r\n\n\nAs mine on hers, so hers is set on mine;\r\n\n\nAnd all combin’d, save what thou must combine\r\n\n\nBy holy marriage. When, and where, and how', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0),
 Document(page_content='Paris is the properer man, but I’ll warrant you, when I say so, she\r\n\n\nlooks as pale as any clout in the versal world. Doth not rosemary and\r\n\n\nRomeo begin both with a letter?\r\n\n\n\r\n\n\nROMEO.\r\n\n\nAy, Nurse; what of that? Both with an R.\r\n\n\n\r\n\n\nNURSE.\r\n\n\nAh, mocker! That’s the dog’s name. R is for the—no, I know it begins\r\n\n\nwith some other letter, and she hath the prettiest sententious of it,\r\n\n\nof you and rosemary, that it would do you good to hear it.\r\n\n\n\r\n\n\nROMEO.\r\n\n\nCommend me to thy lady.\r\n\n\n\r\n\n\nNURSE.\r\n\n\nAy, a thousand times. Peter!\r\n\n\n\r\n\n\n [_Exit Romeo._]\r\n\n\n\r\n\n\nPETER.\r\n\n\nAnon.\r\n\n\n\r\n\n\nNURSE.\r\n\n\nBefore and apace.\r\n\n\n\r\n\n\n [_Exeunt._]\r\n\n\n\r\n\n\nSCENE V. Capulet’s Garden.\r\n\n\n\r\n\n\n Enter Juliet.\r\n\n\n\r\n\n\nJULIET.\r\n\n\nThe clock struck nine when I did send the Nurse,\r\n\n\nIn half an hour she promised to return.\r\n\n\nPerchance she cannot meet him. That’s not so.\r\n\n\nO, she is lame. Love’s heralds should be thoughts,\r\n\n\nWhich ten times faster glides than the sun’s beams,\r\n\n\nDriving back shadows over lowering hills:\r\n\n\nTherefore do nimble-pinion’d doves draw love,', lookup_str='', metadata={'source': 'https://www.gutenberg.org/cache/epub/1513/pg1513.txt'}, lookup_index=0)]

OpenAI 答案 #2

result["answer"]

罗莎琳是罗密欧在遇到朱丽叶之前爱上的女人。 修士劳伦斯评论罗密欧的突然改变,说:“罗莎琳,你如此亲爱的,这么快就被抛弃了吗?” (第 2 幕,第 3 场)。 罗密欧证实他忘记了罗莎琳的名字和痛苦,说“我忘记了那个名字,以及那个名字的痛苦”(第 2 幕,第 3 场)。

班伏里奥提到罗瑟琳将出席一场盛宴,他说:“在凯普莱特的这同一个古老的宴会上,您如此喜爱美丽的罗莎琳”(第 1 幕,第 2 场)。 然而,罗密欧后来告诉修士劳伦斯,他的心爱现在已经落在了朱丽叶身上,他说:“那么清楚地知道我心爱的是富有的凯普莱特的美丽女儿”(第二幕,场景 3)。

SparkNote#2

SparkNotes 编辑。 “罗密欧与朱丽叶”SparkNotes.com,SparkNotes LLC,2005 年,链接

当我们第一次见到罗密欧时,他表现出相思病,他向班伏里奥解释说他爱上了一个没有回报他“恩惠”的女人。 罗密欧没有认出这里的女人,但在这个场景和下一个场景之间的某个地方,班伏里奥知道了她的名字,因为在后来的场景中,他指出她在凯普莱特舞会的嘉宾名单上:“在凯普莱特的这个古老盛宴上 / 支持你所爱的美丽的罗瑟琳”(I.ii.83-84)。
从这个参考中可以清楚地看出,罗密欧爱上了一个名叫罗莎琳的女人,而且她和朱丽叶一样,是凯普莱特人。 班伏里奥然后建议罗密欧应该通过参加舞会并观看“维罗纳所有令人钦佩的美女”(I.ii.85)来克服罗莎琳。 Benvolio 坚持说:“将她的脸与我要展示的一些人进行比较,/我会让你认为你的天鹅是乌鸦”(I.ii.87-88)。
罗密欧严格按照班伏里奥的建议行事。 尽管罗莎琳从未出现在舞台上,但她仍然扮演着重要的角色,因为她对罗密欧的拒绝最终导致他与朱丽叶的第一次命运相遇。

我希望你喜欢这个简单的教程。 如果有任何问题或意见,请联系我们。


原文链接:Chat with Document(s) using OpenAI ChatGPT API and Text Embedding

BimAnt翻译整理,转载请标明出处