Files

62 lines
1.4 KiB
Python
Raw Permalink Normal View History

"""FastGPT Python SDK
2026-01-06 14:38:32 +08:00
A Python client library for interacting with FastGPT's OpenAPI.
"""
2026-01-06 16:36:13 +08:00
from fastgpt_client.async_client import (
AsyncAppClient,
AsyncChatClient,
AsyncFastGPTClient,
)
2026-01-06 14:38:32 +08:00
from fastgpt_client.client import AppClient, ChatClient, FastGPTClient
from fastgpt_client.exceptions import (
APIError,
AuthenticationError,
FastGPTError,
RateLimitError,
StreamParseError,
ValidationError,
)
from fastgpt_client.images import (
decode_data_url,
encode_image_data_url,
image_part_from_bytes,
image_part_from_path,
image_url_part,
is_data_url,
)
from fastgpt_client.streaming import aiter_stream_events, iter_stream_events
from fastgpt_client.stream_types import FastGPTInteractiveEvent, FastGPTStreamEvent
2026-01-06 14:38:32 +08:00
__all__ = [
# Synchronous clients
"FastGPTClient",
"ChatClient",
"AppClient",
2026-01-06 16:36:13 +08:00
# Asynchronous clients
"AsyncFastGPTClient",
"AsyncChatClient",
"AsyncAppClient",
2026-01-06 14:38:32 +08:00
# Exceptions
"FastGPTError",
"APIError",
"AuthenticationError",
"RateLimitError",
"ValidationError",
"StreamParseError",
# Streaming helpers
"iter_stream_events",
"aiter_stream_events",
"FastGPTStreamEvent",
"FastGPTInteractiveEvent",
# Image helpers
"encode_image_data_url",
"decode_data_url",
"is_data_url",
"image_url_part",
"image_part_from_bytes",
"image_part_from_path",
2026-01-06 14:38:32 +08:00
]
__version__ = "0.1.0"