deepinfra-client-rs
A Rust client for interacting with Deepinfra APIs including chat completions and audio transcriptions.
Overview
deepinfra-client-rs is a lightweight library that provides an easy way to communicate with Deepinfra's API endpoints for chat completions and audio transcriptions. It leverages popular crates like reqwest, serde, and tracing.
Features
- Chat Completions: Supports generating completions using OpenAI's conversation style protocols.
- Audio Transcriptions: Enables conversion of audio files to text.
- Modular Design: Separated modules for chat completions, audio transcriptions, client building, and feature prelude.
Installation
Add the following dependency to your Cargo.toml:
[]
= "0.0.1"
Or clone the repository from GitHub and build the project using Cargo.
Usage
Import the required modules:
// ...existing code...
use *;
// ...existing code...
Initialize the client:
// ...existing code...
let client = new?;
// ...existing code...
Check out the individual modules for detailed usage examples:
chat_completition: For managing chat conversations.audio_transcription: For handling audio transcription requests.
Advanced Usage
Below are quick examples to show how to perform chat completions and audio transcriptions.
Chat Completions
use *;
// ...existing code...
async
Audio Transcriptions
use *;
use ;
// ...existing code...
async