Skip to content

Conversation

@Alexxigang
Copy link

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.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@Alexxigang Alexxigang requested a review from a team December 28, 2025 10:23
@cla-assistant
Copy link

cla-assistant bot commented Dec 28, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Alexxigang
❌ ruigangliu.lrg


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.

Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant