Enha: llmparser build prompt

This commit is contained in:
Grail Finder
2025-06-23 13:27:35 +03:00
parent 840b85887b
commit 83513b6c6a
2 changed files with 46 additions and 15 deletions

View File

@ -383,21 +383,7 @@ func (b *Bot) BuildPrompt(room *models.Room) string {
func (b *Bot) CallLLM(prompt string) ([]byte, error) {
method := "POST"
payload := strings.NewReader(fmt.Sprintf(`{
"model": "deepseek-chat",
"prompt": "%s",
"echo": false,
"frequency_penalty": 0,
"logprobs": 0,
"max_tokens": 1024,
"presence_penalty": 0,
"stop": null,
"stream": false,
"stream_options": null,
"suffix": null,
"temperature": 1,
"top_p": 1
}`, prompt))
payload := b.LLMParser.MakePayload(prompt)
client := &http.Client{}
req, err := http.NewRequest(method, b.cfg.LLMConfig.URL, payload)
if err != nil {