fix: fix the typo of openai (#1298)

This commit is contained in:
Yunwei Xiao
2023-03-07 08:38:41 +08:00
committed by GitHub
parent 595dbdb0ec
commit c57cea1aaa
2 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ import (
)
func (s *Server) registerOpenAIRoutes(g *echo.Group) {
g.POST("/opanai/chat-completion", func(c echo.Context) error {
g.POST("/openai/chat-completion", func(c echo.Context) error {
ctx := c.Request().Context()
openAIApiKeySetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
Name: api.SystemSettingOpenAIAPIKeyName,
@ -62,7 +62,7 @@ func (s *Server) registerOpenAIRoutes(g *echo.Group) {
return c.JSON(http.StatusOK, composeResponse(result))
})
g.POST("/opanai/text-completion", func(c echo.Context) error {
g.POST("/openai/text-completion", func(c echo.Context) error {
ctx := c.Request().Context()
openAIApiKeySetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
Name: api.SystemSettingOpenAIAPIKeyName,
@ -113,7 +113,7 @@ func (s *Server) registerOpenAIRoutes(g *echo.Group) {
return c.JSON(http.StatusOK, composeResponse(result))
})
g.GET("/opanai/enabled", func(c echo.Context) error {
g.GET("/openai/enabled", func(c echo.Context) error {
ctx := c.Request().Context()
openAIApiKeySetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
Name: api.SystemSettingOpenAIAPIKeyName,