Files
example-eino/steps/trans/internal/llm.go
T
zhaoyupeng.elqbandTRAE CLI ee8afb10db feat: add streaming text Chain example and simplify ASR flow
Add character-by-character fake input, event collection, request logging,
and a model pre-handler to the steps/trans example.

Split the ASR Chain into readable node functions, strip transcript markers,
configure the local ASR service, and remove the ASR example test files.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-11-18 21:26:29 +08:00

24 lines
504 B
Go

package internal
import (
"context"
"log"
"os"
"github.com/cloudwego/eino-ext/components/model/openai"
)
func MustNewChatModel(ctx context.Context) *openai.ChatModel {
chat, err := openai.NewChatModel(ctx, &openai.ChatModelConfig{
APIKey: os.Getenv("AI_KEY"),
BaseURL: "https://ai.loveuer.com/v1",
Model: "mini-chat",
ReasoningEffort: openai.ReasoningEffortLevelLow,
})
if err != nil {
log.Panicf("new openai chat model failed: %v", err)
}
return chat
}