Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: fix the typo of openai (#1298)
Yunwei Xiaoc57cea1aaadc
diff --git a/server/openai.go b/server/openai.goindex 7be7129bc..114a78c66 100644--- a/server/openai.go+++ b/server/openai.go@@ -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,diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.tsindex 1d4cdfef2..286020748 100644--- a/web/src/helpers/api.ts+++ b/web/src/helpers/api.ts@@ -247,19 +247,19 @@ export function deleteIdentityProvider(id: IdentityProviderId) {}export function postChatCompletion(prompt: string) {- return axios.post<ResponseObject<string>>(`/api/opanai/chat-completion`, {+ return axios.post<ResponseObject<string>>(`/api/openai/chat-completion`, {prompt,});}export function postTextCompletion(prompt: string) {- return axios.post<ResponseObject<string>>(`/api/opanai/text-completion`, {+ return axios.post<ResponseObject<string>>(`/api/openai/text-completion`, {prompt,});}export function checkOpenAIEnabled() {- return axios.get<ResponseObject<boolean>>(`/api/opanai/enabled`);+ return axios.get<ResponseObject<boolean>>(`/api/openai/enabled`);}export async function getRepoStarCount() {