fix(file and app):

embedding and volcano model
This commit is contained in:
Timebomb2018
2026-03-25 18:06:01 +08:00
parent caab58dd2f
commit 294ee49d59
3 changed files with 3 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ class RedBearEmbeddings(Embeddings):
input=contents,
**kwargs
)
return [item.embedding for item in response.data]
return [response.data.embedding]
async def aembed_multimodal(
self,

View File

@@ -64,7 +64,6 @@ class RedBearImageGenerator:
prompt: 提示词
image: 参考图片URL或URL列表图文生图/多图融合)
size: 图片尺寸,支持 "2K", "2048x2048", "1920x1080"至少3686400像素
n: 生成数量
output_format: 输出格式,如 "png", "jpg"
response_format: 返回格式,"url""b64_json"
watermark: 是否添加水印

View File

@@ -25,8 +25,7 @@ class GenerationService:
self,
model_config_id: str,
prompt: str,
size: Optional[str] = "1024x1024",
n: int = 1,
size: Optional[str] = "2k",
**kwargs
) -> Dict[str, Any]:
"""
@@ -36,7 +35,6 @@ class GenerationService:
model_config_id: 模型配置ID
prompt: 提示词
size: 图片尺寸
n: 生成数量
**kwargs: 其他参数
Returns:
@@ -69,7 +67,7 @@ class GenerationService:
# 生成图片
generator = RedBearImageGenerator(config)
result = await generator.agenerate(prompt, size, n, **kwargs)
result = await generator.agenerate(prompt, size, **kwargs)
return result