Enha: llmparser build prompt
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder