Skip to main content

An integration between iFlytek Spark and Haystack

Project description

iflytek-haystack

PyPI - Version PyPI - Python Version


An integration between iFlytek Spark and Haystack. iFlytek Spark exposes an OpenAI-compatible chat completion API, so IFlytekChatGenerator builds on Haystack's OpenAIChatGenerator.

Installation

pip install iflytek-haystack

Usage

Get an API password from the iFlytek open platform console and set it as the IFLYTEK_API_KEY environment variable, then pick a model such as generalv3.5, 4.0Ultra or lite.

from haystack.dataclasses import ChatMessage
from haystack_integrations.components.generators.iflytek import IFlytekChatGenerator

client = IFlytekChatGenerator(model="4.0Ultra")
response = client.run([ChatMessage.from_user("用一句话介绍你自己")])
print(response)

Contributing

Refer to the general Contribution Guidelines.

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

iflytek_haystack-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

iflytek_haystack-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file iflytek_haystack-0.1.0.tar.gz.

File metadata

  • Download URL: iflytek_haystack-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iflytek_haystack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7af099ce70d20a0902c6da1a27348961e335c334edec29c2e8477fa8e3569c16
MD5 c1e0810f6cc00d96a0e53deb747fb011
BLAKE2b-256 15f2ad65634710b80148a5216ad21763ed65ba74856c281d650d0aac0801c767

See more details on using hashes here.

Provenance

The following attestation bundles were made for iflytek_haystack-0.1.0.tar.gz:

Publisher: publish.yml on FenjuFu/iflytek-haystack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iflytek_haystack-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iflytek_haystack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c193a74385c5f6468a2fd23b3e8f96018a9459def24c1973e64ed820f59c028
MD5 5db9ae05f877c0b322ed8c62dbe37272
BLAKE2b-256 a2f6afa96b212486cce2c6aca39aa7a2f9adbf4f1cef0c6581a32c5ee316b9b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for iflytek_haystack-0.1.0-py3-none-any.whl:

Publisher: publish.yml on FenjuFu/iflytek-haystack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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