Skip to content

component.embedding中的bug #1

@Airplus14

Description

@Airplus14

你好!在component.embedding中第27-30行的函数compare中:

def compare(self, text1: str, temxt2: str):
    embed1=self.embedding.embed_query(text1) 
    embed2=self.embedding.embed_query(text2)
    return np.dot(embed1, embed2) / (np.linalg.norm(embed1) * np.linalg.norm(embed2))

第三个形参名称有误(temxt2 -> text2)
非常感谢同学的用心分享,我正在这个基础上进行学习,受益颇多😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions