Skip to content

Commit

Permalink
docs: 修复一些GPT的拼写错误 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffinly authored Apr 11, 2023
1 parent 0adbece commit dff744f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
type Configuration struct {
// 日志级别,info或者debug
LogLevel string `yaml:"log_level"`
// gtp apikey
// gpt apikey
ApiKey string `yaml:"api_key"`
// 请求的 URL 地址
BaseURL string `yaml:"base_url"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/user_chatid.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (s *UserService) GetAnswerID(userId, chattitle string) uint {
return sessionContext.(uint)
}

// ClearUserSessionContext 清空GTP上下文,接收文本中包含 SessionClearToken
// ClearUserSessionContext 清空GPT上下文,接收文本中包含 SessionClearToken
func (s *UserService) ClearAnswerID(userId, chattitle string) {
s.cache.Delete(userId + "_" + chattitle)
}
4 changes: 2 additions & 2 deletions pkg/cache/user_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cache

import "github.com/patrickmn/go-cache"

// SetUserSessionContext 设置用户会话上下文文本,question用户提问内容,GTP回复内容
// SetUserSessionContext 设置用户会话上下文文本,question用户提问内容,GPT回复内容
func (s *UserService) SetUserSessionContext(userId string, content string) {
s.cache.Set(userId+"_content", content, cache.DefaultExpiration)
}
Expand All @@ -16,7 +16,7 @@ func (s *UserService) GetUserSessionContext(userId string) string {
return sessionContext.(string)
}

// ClearUserSessionContext 清空GTP上下文,接收文本中包含 SessionClearToken
// ClearUserSessionContext 清空GPT上下文,接收文本中包含 SessionClearToken
func (s *UserService) ClearUserSessionContext(userId string) {
s.cache.Delete(userId + "_content")
}

0 comments on commit dff744f

Please sign in to comment.