feat: demonstrate streaming ASR composition with Eino Chain

This commit is contained in:
loveuer committed 2026-11-18 19:40:31 +08:00
1 parent 1373f0903f
commit 2cf82034ec
8 files changed
+685 -8

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
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
}