fix(file and app):
embedding and volcano model
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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: 是否添加水印
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user