-
Notifications
You must be signed in to change notification settings - Fork 128
Realgang/feat spring web starter #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Realgang/feat spring web starter #382
Conversation
|
ruigangliu.lrg seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for a Chat Completions API Spring Web Starter to AgentScope-Java, implementing an OpenAI-compatible HTTP API for chat completions. The implementation includes both streaming (SSE) and non-streaming endpoints, session management, message conversion, and comprehensive test coverage.
Key Changes:
- New Spring Boot starter module exposing Chat Completions HTTP API endpoints
- Session-based agent management with in-memory implementation
- Support for both streaming and non-streaming chat responses
- Comprehensive unit tests for all components
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
agentscope-spring-boot-starters/pom.xml |
Adds new chat-completions-web-starter module to parent POM |
agentscope-chat-completions-web-starter/pom.xml |
Defines dependencies for the new starter module |
ChatCompletionsController.java |
REST controller implementing POST endpoints for chat completions |
ChatCompletionsStreamingService.java |
Service handling SSE streaming responses |
ChatMessageConverter.java |
Converts HTTP DTOs to framework message objects |
ChatCompletionsResponseBuilder.java |
Builds response payloads for API responses |
InMemorySessionManager.java |
In-memory session management implementation |
ChatCompletionsSessionManager.java |
Interface for session management |
ChatCompletionsWebAutoConfiguration.java |
Spring Boot auto-configuration for the starter |
ChatCompletionsProperties.java |
Configuration properties for the web starter |
API DTOs (ChatMessage.java, ChatCompletionsRequest.java, etc.) |
Request/response data transfer objects |
| Test files | Comprehensive unit tests for all components |
chat-completions-web example |
Example Spring Boot application demonstrating the starter usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AgentScope-Java Version
[The version of AgentScope-Java i'm working on: 1.0.5-SNAPSHOT]
Description
[Please describe the background, purpose, changes made, and how to test this PR]
add support for [Feature]: Chat Completions API Spring Web Starter
#219
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)