Commit Graph

4 Commits

Author SHA1 Message Date
王性驊 f9a92b0bfa add refactor doc 2026-04-06 22:21:32 +08:00
王性驊 3dc49bfc7d fix: remove duplicate Verbose field and use raw JSON parsing for handlers
- Remove Verbose from Config struct (inherited from RestConf)
- Remove Verbose from yaml config to fix conflict
- Use raw JSON parsing in handlers for interface{} Content field
- Fix config tests
2026-04-04 12:49:32 +08:00
王性驊 9e2a10b614 feat: complete implementation of all endpoints and config
- Update etc/chat-api.yaml with all configuration options (no env vars)
- Add ToBridgeConfig method to Config for YAML-based config
- Implement complete AnthropicMessages streaming with SSE
- Add Tools field to AnthropicRequest
- Update ServiceContext with model tracking
- Add all CRUD handlers for health, models, chat, anthropic

Features restored:
- Health check endpoint
- Models list with caching
- ChatCompletions streaming (OpenAI format)
- AnthropicMessages streaming (Anthropic format)
- Tool calls support for both formats
- Thinking/reasoning content support
- Rate limit detection and handling
- Account pool integration
- Request/response logging
- Model resolution with strict mode
- Workspace and prompt truncation handling
2026-04-03 23:17:04 +08:00
王性驊 8b6abbbba7 refactor(task-0): initialize go-zero project structure
- Add go-zero dependency to go.mod
- Create api/chat.api with OpenAI-compatible types
- Create etc/chat.yaml configuration
- Update Makefile with goctl commands
- Generate go-zero scaffold (types, handlers, logic, svc)
- Move chat.go to cmd/chat/chat.go
- Add Config struct for go-zero (keep BridgeConfig for backward compatibility)
2026-04-03 17:15:35 +08:00