Files
fastgpt-python-sdk/fastgpt_client/__init__.py
Xin Wang ef2614a70a feat: add chat_tui example for FastGPT with Textual interface
- Introduced a new example script `chat_tui.py` that provides a full-screen Textual interface for interacting with FastGPT.
- Implemented streaming chat updates, workflow logging, and modal handling for interactive nodes.
- Enhanced FastGPT client with new streaming capabilities and structured event types for better interaction handling.
- Normalized base URL handling in the client to prevent duplicate `/api` paths.
- Added tests for streaming event parsing and interaction handling.
2026-03-10 15:34:27 +08:00

47 lines
1.1 KiB
Python

"""FastGPT Python SDK
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,
AuthenticationError,
FastGPTError,
RateLimitError,
StreamParseError,
ValidationError,
)
from fastgpt_client.streaming import aiter_stream_events, iter_stream_events
from fastgpt_client.stream_types import FastGPTInteractiveEvent, FastGPTStreamEvent
__all__ = [
# Synchronous clients
"FastGPTClient",
"ChatClient",
"AppClient",
# Asynchronous clients
"AsyncFastGPTClient",
"AsyncChatClient",
"AsyncAppClient",
# Exceptions
"FastGPTError",
"APIError",
"AuthenticationError",
"RateLimitError",
"ValidationError",
"StreamParseError",
# Streaming helpers
"iter_stream_events",
"aiter_stream_events",
"FastGPTStreamEvent",
"FastGPTInteractiveEvent",
]
__version__ = "0.1.0"