Skip to main content

A simple example Python package

Project description

Embedd 简介 Embedd 是一个 Python 工具,用于处理和搜索文本嵌入。它支持从不同格式的文件中读取数据,生成文本嵌入,并提供了一种方法来搜索这些嵌入以找到与给定查询最相似的记录。

功能 生成文本嵌入。 提供本地文档搜索功能。

安装 您可以通过 pip 安装此包: pip install embedd

使用前的配置 在使用此包之前,您需要一个 OpenAI API 密钥。您可以通过以下几种方式提供 API 密钥:

直接在创建 Embed 实例时传入。 通过配置文件传入。 从环境变量 OPENAI_API_KEY 中读取。

基本使用 创建嵌入文件 embedder = Embed(api_key="您的API密钥") embedder.create_embedding_file("path/to/input.csv", "path/to/output")

从文件中搜索 python Copy code results = embedder.search_from_file("path/to/data.csv", "用户查询", top_n=3, to_print=True)

功能说明 create_embedding_file: 从指定的文件中读取数据,并创建文本嵌入。支持的文件格式包括 CSV、XLS、XLSX 和 JSON。输出文件格式可以是 CSV 或 JSON。 search_from_file: 在提供的数据文件中搜索与用户查询最相似的文档。支持的文件格式同上。

注意事项 某些方法(如 upload_embedding 和 search_docs_server)目前还在开发中,暂时不可用。 贡献 欢迎对此项目进行贡献。请确保在提交 Pull Request 之前测试您的代码。

许可证 此项目根据 MIT 许可证发布。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

embedd-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embedd-0.0.4-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file embedd-0.0.4.tar.gz.

File metadata

  • Download URL: embedd-0.0.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for embedd-0.0.4.tar.gz
Algorithm Hash digest
SHA256 fd3f236433595dc94e8314274e58d098e5c7ca882cc787520e442cdd129dec88
MD5 4415e748aec92549071fc2a8c1ed4ca2
BLAKE2b-256 b0c911e5a970bb3d481c2dde8bfc022ea0df3a473b67412f850a8b8af53f11b2

See more details on using hashes here.

File details

Details for the file embedd-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: embedd-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for embedd-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 04defbb00d0f65aec6d7f67b0c8b635e803f34c2a3893eaf05658cb9c3b14daa
MD5 1d0ce9a04c022f6b40dffbf78ee4ddba
BLAKE2b-256 e0542eef5002dd7563e7036445c78da70ff50dbe54b9e5d06ef1f9ce0e40b149

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page