Add async client support
- Add AsyncFastGPTClient, AsyncChatClient, AsyncAppClient classes - Implement async/await patterns with httpx.AsyncClient - Add async context manager support (async with, async for) - Add async retry logic with exponential backoff - Add 29 async unit tests covering all async client methods - Update __init__.py to export async clients 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
A Python client library for interacting with FastGPT's OpenAPI.
|
||||
"""
|
||||
|
||||
from fastgpt_client.async_client import (
|
||||
AsyncAppClient,
|
||||
AsyncChatClient,
|
||||
AsyncFastGPTClient,
|
||||
)
|
||||
from fastgpt_client.client import AppClient, ChatClient, FastGPTClient
|
||||
from fastgpt_client.exceptions import (
|
||||
APIError,
|
||||
@@ -18,6 +23,10 @@ __all__ = [
|
||||
"FastGPTClient",
|
||||
"ChatClient",
|
||||
"AppClient",
|
||||
# Asynchronous clients
|
||||
"AsyncFastGPTClient",
|
||||
"AsyncChatClient",
|
||||
"AsyncAppClient",
|
||||
# Exceptions
|
||||
"FastGPTError",
|
||||
"APIError",
|
||||
|
||||
Reference in New Issue
Block a user