little fix

This commit is contained in:
Star 2024-10-29 12:33:18 +08:00
parent 3e64ec275a
commit dba6f196df
2 changed files with 6 additions and 5 deletions

View File

@ -44,7 +44,7 @@ func (lm *LLM) Support() llm.Support {
return llm.Support{ return llm.Support{
Ask: true, Ask: true,
AskWithImage: true, AskWithImage: true,
AskWithVideo: true, AskWithVideo: false,
AskWithCodeInterpreter: true, AskWithCodeInterpreter: true,
AskWithWebSearch: true, AskWithWebSearch: true,
MakeImage: true, MakeImage: true,

9
gc.go
View File

@ -1,11 +1,12 @@
package zhipu package zhipu
import ( import (
"apigo.cc/ai/llm/llm"
"context" "context"
"errors" "errors"
"github.com/yankeguo/zhipu"
"time" "time"
"apigo.cc/ai/llm/llm"
"github.com/yankeguo/zhipu"
) )
func (lm *LLM) FastMakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usage, error) { func (lm *LLM) FastMakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usage, error) {
@ -25,7 +26,7 @@ func (lm *LLM) MakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usag
} }
config.SetDefault(&lm.config.GCConfig) config.SetDefault(&lm.config.GCConfig)
cc := c.ImageGeneration(config.Model).SetPrompt(prompt) cc := c.ImageGeneration(config.GetModel()).SetPrompt(prompt)
//cc.SetSize(config.GetSize()) //cc.SetSize(config.GetSize())
t1 := time.Now().UnixMilli() t1 := time.Now().UnixMilli()
@ -60,7 +61,7 @@ func (lm *LLM) MakeVideo(prompt string, config llm.GCConfig) ([]string, []string
} }
config.SetDefault(&lm.config.GCConfig) config.SetDefault(&lm.config.GCConfig)
cc := c.VideoGeneration(config.Model).SetPrompt(prompt) cc := c.VideoGeneration(config.GetModel()).SetPrompt(prompt)
cc.SetImageURL(config.GetRef()) cc.SetImageURL(config.GetRef())
t1 := time.Now().UnixMilli() t1 := time.Now().UnixMilli()