feat: replace N8N_BASE_URL with N8N_WEBHOOK_URL (full webhook URL)
This commit is contained in:
@@ -2,7 +2,7 @@ TELEGRAM_BOT_TOKEN=your_bot_token_here
|
|||||||
BOT_MODE=polling
|
BOT_MODE=polling
|
||||||
TELEGRAM_DEBUG=false
|
TELEGRAM_DEBUG=false
|
||||||
|
|
||||||
N8N_BASE_URL=http://localhost:5678
|
N8N_WEBHOOK_URL=http://localhost:5678/webhook/your-webhook-id
|
||||||
N8N_AUTH_TOKEN=
|
N8N_AUTH_TOKEN=
|
||||||
|
|
||||||
OPENAI_API_KEY=your_openai_key_here
|
OPENAI_API_KEY=your_openai_key_here
|
||||||
|
|||||||
@@ -51,11 +51,10 @@ func main() {
|
|||||||
downloader := infratelegram.NewTelegramFileDownloader(bot)
|
downloader := infratelegram.NewTelegramFileDownloader(bot)
|
||||||
sessionStore := storage.NewRedisSessionStore(redisClient, cfg.Redis.TTLHours)
|
sessionStore := storage.NewRedisSessionStore(redisClient, cfg.Redis.TTLHours)
|
||||||
|
|
||||||
// n8n workflows (configure via env: N8N_WORKFLOW_<INTENT>=<url>)
|
|
||||||
workflows := map[string]n8n.WorkflowConfig{
|
workflows := map[string]n8n.WorkflowConfig{
|
||||||
"default": {
|
"default": {
|
||||||
ID: "default",
|
ID: "default",
|
||||||
WebhookURL: cfg.N8n.BaseURL + "/webhook/default",
|
WebhookURL: cfg.N8n.WebhookURL,
|
||||||
AuthToken: cfg.N8n.AuthToken,
|
AuthToken: cfg.N8n.AuthToken,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ type BotConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type N8nConfig struct {
|
type N8nConfig struct {
|
||||||
BaseURL string `envconfig:"N8N_BASE_URL" required:"true"`
|
WebhookURL string `envconfig:"N8N_WEBHOOK_URL" required:"true"`
|
||||||
AuthToken string `envconfig:"N8N_AUTH_TOKEN"`
|
AuthToken string `envconfig:"N8N_AUTH_TOKEN"`
|
||||||
TimeoutSecs int `envconfig:"N8N_TIMEOUT" default:"30"`
|
TimeoutSecs int `envconfig:"N8N_TIMEOUT" default:"30"`
|
||||||
RetryCount int `envconfig:"N8N_RETRY_COUNT" default:"3"`
|
RetryCount int `envconfig:"N8N_RETRY_COUNT" default:"3"`
|
||||||
|
|||||||
BIN
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.ogg
Normal file
BIN
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.ogg
Normal file
Binary file not shown.
5
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.vtt
Normal file
5
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:02.000
|
||||||
|
That's what she said
|
||||||
|
|
||||||
BIN
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.wav
Normal file
BIN
voice/20eedbc7-6e5f-4709-b991-86ffcee4e09e.wav
Normal file
Binary file not shown.
BIN
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.ogg
Normal file
BIN
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.ogg
Normal file
Binary file not shown.
5
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.vtt
Normal file
5
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:02.000
|
||||||
|
1, 2, 3, 4
|
||||||
|
|
||||||
BIN
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.wav
Normal file
BIN
voice/4fbde937-911e-49ab-9be4-eb8e066d6118.wav
Normal file
Binary file not shown.
BIN
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.ogg
Normal file
BIN
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.ogg
Normal file
Binary file not shown.
5
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.vtt
Normal file
5
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:02.000
|
||||||
|
Fazla mahsuçları...
|
||||||
|
|
||||||
BIN
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.wav
Normal file
BIN
voice/60ad33c2-74b0-4adc-9264-aae265e251b2.wav
Normal file
Binary file not shown.
BIN
voice/a498c904-063a-4d01-aef1-1ef899b62150.ogg
Normal file
BIN
voice/a498c904-063a-4d01-aef1-1ef899b62150.ogg
Normal file
Binary file not shown.
5
voice/a498c904-063a-4d01-aef1-1ef899b62150.vtt
Normal file
5
voice/a498c904-063a-4d01-aef1-1ef899b62150.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:02.000
|
||||||
|
Raz, dwa, trzy, cztery.
|
||||||
|
|
||||||
BIN
voice/a498c904-063a-4d01-aef1-1ef899b62150.wav
Normal file
BIN
voice/a498c904-063a-4d01-aef1-1ef899b62150.wav
Normal file
Binary file not shown.
BIN
voice/bac11971-7f12-44df-924d-fd0ed8db284e.ogg
Normal file
BIN
voice/bac11971-7f12-44df-924d-fd0ed8db284e.ogg
Normal file
Binary file not shown.
5
voice/bac11971-7f12-44df-924d-fd0ed8db284e.vtt
Normal file
5
voice/bac11971-7f12-44df-924d-fd0ed8db284e.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:01.000
|
||||||
|
Raz, dwa, trzy.
|
||||||
|
|
||||||
BIN
voice/bac11971-7f12-44df-924d-fd0ed8db284e.wav
Normal file
BIN
voice/bac11971-7f12-44df-924d-fd0ed8db284e.wav
Normal file
Binary file not shown.
BIN
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.ogg
Normal file
BIN
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.ogg
Normal file
Binary file not shown.
5
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.vtt
Normal file
5
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.vtt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
WEBVTT
|
||||||
|
|
||||||
|
00:00:00.000 --> 00:00:02.000
|
||||||
|
Raz, dwa, trzy, cztery.
|
||||||
|
|
||||||
BIN
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.wav
Normal file
BIN
voice/c2d834e8-dd39-48d0-a98b-942cb157c99b.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user