Documentation ¶
Index ¶
Constants ¶
View Source
const ( LimitMessage = "本日の利用制限を超えました。明日以降に再度お試しください。" MaxFetchMessages = 20 )
View Source
const CharacterSettings = `` /* 2167-byte string literal not displayed */
View Source
const (
DailyTokenLimit = 20000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotMessage ¶
type SlackMessage ¶
func (*SlackMessage) OptimizeMessage ¶
func (m *SlackMessage) OptimizeMessage(botUserID string) string
type SlackMessages ¶
type SlackMessages []SlackMessage
func ConvertToSlackMessages ¶
func ConvertToSlackMessages(messages []slack.Message) SlackMessages
func (SlackMessages) CreatePrompt ¶
func (messages SlackMessages) CreatePrompt(botUserID string) string
func (SlackMessages) LimitMessages ¶
func (messages SlackMessages) LimitMessages(maxMessages int) SlackMessages
type SpreadsheetData ¶
type SpreadsheetData struct { UserID string TotalUsage int LastUsedAt string TokensUsage int DailyTokensUsage int TotalTokensUsage int }
func NewSpreadsheet ¶
func (*SpreadsheetData) AddTokenUsage ¶
func (s *SpreadsheetData) AddTokenUsage(tokens int)
func (*SpreadsheetData) CanUseDailyTokens ¶
func (s *SpreadsheetData) CanUseDailyTokens() error
func (*SpreadsheetData) ResetDailyUsageIfNeeded ¶
func (s *SpreadsheetData) ResetDailyUsageIfNeeded()
type SpreadsheetID ¶
type SpreadsheetID string
Click to show internal directories.
Click to hide internal directories.