Remove concurrency config

Inference engines handle this now.
This commit is contained in:
dwrz
2026-06-02 11:47:38 +00:00
parent 07377abff6
commit f19177bd84
4 changed files with 0 additions and 42 deletions

View File

@@ -29,7 +29,6 @@ import (
"github.com/google/uuid"
openai "github.com/sashabaranov/go-openai"
"golang.org/x/sync/semaphore"
)
//go:embed all:static/*
@@ -42,7 +41,6 @@ type Service struct {
llm *llm.Client
log *slog.Logger
mux *http.ServeMux
sem *semaphore.Weighted
server *http.Server
stt *stt.Client
tmpl *template.Template
@@ -57,7 +55,6 @@ func New(cfg *config.Config, log *slog.Logger) (*Service, error) {
cfg: cfg,
log: log,
mux: http.NewServeMux(),
sem: semaphore.NewWeighted(int64(cfg.Concurrency)),
}
// Setup tool registry.
@@ -193,7 +190,6 @@ func (svc *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func (svc *Service) Run(ctx context.Context) error {
svc.log.Info(
"starting odidere",
slog.Int("concurrency", svc.cfg.Concurrency),
slog.Group(
"llm",
slog.String("url", svc.cfg.LLM.URL),
@@ -582,17 +578,6 @@ func (svc *Service) voiceStream(w http.ResponseWriter, r *http.Request) {
return
}
// Acquire semaphore.
if err := svc.sem.Acquire(ctx, 1); err != nil {
http.Error(
w,
"service unavailable",
http.StatusServiceUnavailable,
)
return
}
defer svc.sem.Release(1)
var (
messages = req.Messages
transcription string