feat: add progressive Eino examples and unify weather provider
This commit is contained in:
1 parent
73f6f0901e
commit
1373f0903f
18 files changed
+893
-380
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user