Refactor: pngmeta rewrite

This commit is contained in:
Grail Finder
2025-03-10 20:08:07 +03:00
parent 10f0efbb2a
commit 0497cdcfe6
5 changed files with 410 additions and 111 deletions

3
bot.go
View File

@@ -94,9 +94,11 @@ func fetchModelName() *models.LLMModels {
return &llmModel
}
// nolint
func fetchDSBalance() *models.DSBalance {
url := "https://api.deepseek.com/user/balance"
method := "GET"
// nolint
req, err := http.NewRequest(method, url, nil)
if err != nil {
logger.Warn("failed to create request", "error", err)
@@ -119,6 +121,7 @@ func fetchDSBalance() *models.DSBalance {
func sendMsgToLLM(body io.Reader) {
choseChunkParser()
// nolint
req, err := http.NewRequest("POST", cfg.CurrentAPI, body)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")