feat: initialize Eino examples and ADK applications
Include chat, weather, image, travel, streaming ASR and text examples, shared model initialization, documentation, and existing tests. Co-authored-by: TRAE CLI <traecli@bytedance.com>
This commit is contained in:
commit
81deca8c8e
75 files changed
+7048
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package tool
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestImageArguments(t *testing.T) {
|
||||
image := NewImage(nil)
|
||||
for _, arguments := range []string{`{`, `{}`, `{"prompt":" "}`} {
|
||||
if _, err := image.InvokableRun(context.Background(), arguments); err == nil {
|
||||
t.Fatalf("应拒绝无效参数: %s", arguments)
|
||||
}
|
||||
}
|
||||
info, err := image.Info(context.Background())
|
||||
if err != nil || info.Name != "generate_image" {
|
||||
t.Fatalf("工具定义 = %+v,错误 = %v", info, err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user