1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 09:19:54 +00:00

use yml for config

This commit is contained in:
Laura
2025-08-16 15:15:06 +02:00
parent f5f984a46f
commit abefbf1b92
12 changed files with 71 additions and 127 deletions

View File

@@ -122,7 +122,7 @@ func (r *Request) Parse() (*openrouter.ChatCompletionRequest, error) {
request.Messages = append(request.Messages, openrouter.SystemMessage(prompt))
}
if model.Tools && r.Search && ExaToken != "" {
if model.Tools && r.Search && env.Tokens.Exa != "" {
request.Tools = GetSearchTools()
request.ToolChoice = "auto"
@@ -216,10 +216,10 @@ func HandleChat(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
for iteration := range MaxIterations {
debug("iteration %d of %d", iteration+1, MaxIterations)
for iteration := range env.Settings.MaxIterations {
debug("iteration %d of %d", iteration+1, env.Settings.MaxIterations)
if iteration == MaxIterations-1 {
if iteration == env.Settings.MaxIterations-1 {
debug("no more tool calls")
request.Tools = nil