router.go 482 B

1234567891011121314151617
  1. package llm
  2. import "github.com/gin-gonic/gin"
  3. func InitRouter(r *gin.RouterGroup) {
  4. r.GET("llm_messages", GetLLMRecord)
  5. r.POST("llm_messages", StoreLLMRecord)
  6. }
  7. // InitLocalRouter for main node only (no proxy)
  8. func InitLocalRouter(r *gin.RouterGroup) {
  9. // LLM endpoints that should only run on main node
  10. r.POST("llm", MakeChatCompletionRequest)
  11. // Code Completion
  12. r.GET("code_completion", CodeCompletion)
  13. r.GET("code_completion/enabled", GetCodeCompletionEnabledStatus)
  14. }