30 lines
764 B
Go
30 lines
764 B
Go
package copilot
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/gofrs/uuid"
|
|
"net/http"
|
|
)
|
|
|
|
// GetAgents 获取代理列表
|
|
func GetAgents(c *gin.Context) {
|
|
requestID := uuid.Must(uuid.NewV4()).String()
|
|
c.Header("x-github-request-id", requestID)
|
|
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"agents": []gin.H{
|
|
{
|
|
"id": "github/copilot-workspace",
|
|
"name": "@workspace",
|
|
"description": "Ask questions and get answers about your codebase.",
|
|
"version": "1.0.0",
|
|
"publisher": "github",
|
|
"model": "gpt-4o-mini-2024-07-18",
|
|
"capabilities": "workspace",
|
|
"default_model": "gpt-4o-mini-2024-07-18",
|
|
"capabilities_model": "gpt-4o-mini-2024-07-18",
|
|
},
|
|
},
|
|
})
|
|
}
|