sparkdesk-api  by HildaM

Python SDK for SparkDesk LLM API

Created 2 years ago
267 stars

Top 95.9% on SourcePulse

GitHubView on GitHub
Project Summary

This Python package provides a convenient interface for integrating the iFlytek SparkDesk large language models into Python projects. It supports multiple versions of the SparkDesk API (v1.0 to v4.0) and offers a "Web Mode" for direct browser-based interaction, as well as an "API Mode" for programmatic access.

How It Works

The library offers two primary modes of interaction. "Web Mode" leverages browser cookies and specific tokens (cookie, fd, GtToken) captured via browser developer tools to interact with the SparkDesk web interface. "API Mode" uses official API credentials (app_id, api_key, api_secret) obtained from iFlytek for direct programmatic access to various model versions and an assistant API. Both modes support single-turn chat and streaming responses.

Quick Start & Requirements

  • Install: pip install sparkdesk-api==1.6.1
  • Web Mode requires capturing cookie, fd, and GtToken from the SparkDesk web interface.
  • API Mode requires app_id, api_key, and api_secret obtained from iFlytek.
  • Official documentation and demo links are not explicitly provided in the README.

Highlighted Details

  • Supports iFlytek SparkDesk LLM versions v1.0, v2.0, v3.0, v3.5, and v4.0.
  • Includes functionality to access "Spark Knowledge Base".
  • Offers both a streaming chat interface and a single-turn chat function.
  • Provides an "Assistant API" integration.

Maintenance & Community

The project acknowledges contributions from other developers. There are no explicit links to community channels (Discord, Slack), roadmaps, or specific maintainer information.

Licensing & Compatibility

The README does not specify a license. This lack of explicit licensing information may pose compatibility issues for commercial or closed-source projects.

Limitations & Caveats

The "Web Mode" relies on browser-specific tokens that are subject to change by iFlytek, potentially breaking the functionality. Obtaining API credentials for "API Mode" requires application through the iFlytek website, which may involve a review process. The project does not specify Python version requirements beyond what pip handles.

Health Check
Last Commit

11 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
23 stars in the last 30 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral) and Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera).

client-python by mistralai

0%
719
Python SDK for Mistral AI platform
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.