mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-04 07:06:25 +08:00
LLM now works for Titles
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebookincubator/go-belt/tool/logger"
|
||||
llms "github.com/xaionaro-go/streamctl/pkg/llm"
|
||||
llmtypes "github.com/xaionaro-go/streamctl/pkg/llm/types"
|
||||
"github.com/xaionaro-go/streamctl/pkg/secret"
|
||||
@@ -85,7 +86,9 @@ func (l *llm) updateConfigNoLock(
|
||||
func (l *llm) Generate(
|
||||
ctx context.Context,
|
||||
prompt string,
|
||||
) (string, error) {
|
||||
) (_ret string, _err error) {
|
||||
logger.Debugf(ctx, "Generate(ctx, '%s')", prompt)
|
||||
defer func() { logger.Debugf(ctx, "/Generate(ctx, '%s'): '%s', %v", prompt, _ret, _err) }()
|
||||
return xsync.DoA2R2(ctx, &l.locker, l.generateNoLock, ctx, prompt)
|
||||
}
|
||||
|
||||
|
@@ -1328,7 +1328,7 @@ func (p *Panel) generateAlternativeTextFor(
|
||||
return "", fmt.Errorf("unable to get StreamD client: %w", err)
|
||||
}
|
||||
|
||||
return streamD.LLMGenerate(ctx, fmt.Sprintf("I'm about to go live on YouTube and Twitch. Suggest %s."))
|
||||
return streamD.LLMGenerate(ctx, fmt.Sprintf("I'm about to go live on YouTube and Twitch. Suggest %s.", what))
|
||||
}
|
||||
|
||||
func (p *Panel) initMainWindow(
|
||||
|
Reference in New Issue
Block a user