Skip to content

Commit

Permalink
Use random filename for pollinations
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Feb 4, 2025
1 parent bc0c7b7 commit 47c6d27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/aandrew-me/tgpt/v2/client"
"github.com/aandrew-me/tgpt/v2/providers"
"github.com/aandrew-me/tgpt/v2/structs"
"github.com/aandrew-me/tgpt/v2/utils"
http "github.com/bogdanfinn/fhttp"

"github.com/olekukonko/ts"
Expand Down Expand Up @@ -625,7 +626,9 @@ func generateImagePollinations(prompt string) {
}

full_prompt := url_package.QueryEscape(prompt);
filename := strings.ReplaceAll(prompt, " ", "_") + ".jpg"

randId := utils.RandomString(20)
filename := randId + ".jpg"

model := "flux"

Expand Down
3 changes: 2 additions & 1 deletion providers/blackboxai/blackboxai.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func NewRequest(input string, params structs.Params) (*http.Response, error) {
"role": "user"
}
],
"model": "deepseek-ai/DeepSeek-R1"
"model": "deepseek-ai/DeepSeek-R1",
"max_tokens": "3000"
}
`,params.PrevMessages, string(safeInput)))

Expand Down

0 comments on commit 47c6d27

Please sign in to comment.