Commit Graph

5 Commits

Author SHA1 Message Date
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
Xin Wang
a4713456ad fix delete chat bug 2026-01-08 17:36:04 +08:00
Xin Wang
6a6d736991 fix get_chat_records usage 2026-01-08 11:27:21 +08:00
Xin Wang
53874935d6 Add async usage example
Add examples/async_usage.py with:
- Simple async chat completion
- Async streaming with aiter_lines()
- Chat with context using chatId
- Get chat histories asynchronously
- Get app analytics
- Multiple concurrent requests with asyncio.gather()
- Chat with template variables
- Get chat records

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 16:40:32 +08:00
Xin Wang
0495dd4676 Initial commit: FastGPT Python SDK Phase 1
Implement core infrastructure:

- BaseClientMixin with retry logic and validation
- FastGPTClient base class with httpx
- ChatClient with 11 chat operation methods
- AppClient for analytics and logs
- Custom exceptions (APIError, AuthenticationError, etc.)
- Package configuration (pyproject.toml, setup.py)
- Documentation (README.md, CLAUDE.md)
- Basic usage examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 14:39:33 +08:00