Skip to content

Conversation

skyrover001
Copy link

close #2221

我已确认该 PR 已自测通过,相关截图如下:
image

image

image

image

@Copilot Copilot AI review requested due to automatic review settings April 22, 2025 06:52
@skyrover001 skyrover001 changed the title add golang sdk add golang admin sdk Apr 22, 2025
Copy link

@Copilot 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 introduces a Golang SDK along with sample usage documentation, API client implementations, chat functionality, and controller updates for token management. Key changes include:

  • New usage instructions and examples in the readme.
  • Implementation of various API endpoints (user, token, channel, log) and a client to interface with them.
  • Updates to the controller for handling token operations with role-based logic.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/readme.md Added documentation on how to install, initialize, and use the SDK.
sdk/main.go Provided sample usage for testing API endpoints of the SDK.
sdk/chat/chat.go Introduced chat functionality using HTTP streaming.
sdk/api/*.go Implemented API methods for users, tokens, logs, channels, and client.
controller/token.go Updated token controller to support role-based token operations.
Comments suppressed due to low confidence (1)

controller/token.go:249

  • In the UpdateToken handler, the logic for root users may not correctly set the userId when token.UserId is 0. Consider revising this condition to ensure that the correct user context is maintained.
if token.UserId == 0 { userId = token.UserId }

skyrover001 and others added 2 commits April 22, 2025 18:11
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.

add admin api sdk?
1 participant