mirror of
https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins.git
synced 2026-06-06 05:48:59 +08:00
Add Kolor by SiliconFlow API plugin
This commit is contained in:
57
plugins/KolorsSiliconFlow/README.md
Normal file
57
plugins/KolorsSiliconFlow/README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# KolorsSiliconFlowAPI (Kwai-Kolors/Kolors)
|
||||
|
||||
> Kolors is a large-scale text-to-image generation model based on latent diffusion developed by the Kuaishou Kolors team. The model has been trained on billions of text-image pairs and has shown significant advantages in visual quality, complex semantic accuracy, and Chinese and English character rendering. It not only supports Chinese and English input, but also performs well in understanding and generating Chinese-specific content.
|
||||
|
||||
> Refer to [SiliconFlow API Manual of images-generation](https://docs.siliconflow.cn/cn/api-reference/images/images-generations)
|
||||
|
||||
## Schema
|
||||
[openapi.json](./openapi.json)
|
||||
|
||||
## Servers
|
||||
|
||||
`https://api.siliconflow.cn/v1`
|
||||
|
||||
## Supported Models
|
||||
|
||||
## Limits
|
||||
|
||||
> refering to [SiliconFlow Function Calling](https://docs.siliconflow.cn/cn/userguide/guides/function-calling)
|
||||
|
||||
Only available in the those models supports function-calling.
|
||||
|
||||
In SiliconFlow, the models support function-calling are:
|
||||
|
||||
- Deepseek 系列:
|
||||
- deepseek-ai/DeepSeek-V2.5
|
||||
|
||||
- 书生系列:
|
||||
- internlm/internlm2_5-20b-chat
|
||||
- internlm/internlm2_5-7b-chat
|
||||
- Pro/internlm/internlm2_5-7b-chat
|
||||
|
||||
- Qwen系列:
|
||||
- Qwen/Qwen2.5-72B-Instruct
|
||||
- Qwen/Qwen2.5-32B-Instruct
|
||||
- Qwen/Qwen2.5-14B-Instruct
|
||||
- Qwen/Qwen2.5-7B-Instruct
|
||||
- Pro/Qwen/Qwen2.5-7B-Instruct
|
||||
|
||||
- GLM 系列:
|
||||
- THUDM/glm-4-9b-chat
|
||||
- Pro/THUDM/glm-4-9b-chat
|
||||
|
||||
> Also, other models by other providers that can raise function-calling are supported.
|
||||
|
||||
|
||||
## Authentication
|
||||
|
||||
```
|
||||
type: bearer
|
||||
location: header
|
||||
```
|
||||
|
||||
## Preview
|
||||
|
||||

|
||||
|
||||
|
||||
150
plugins/KolorsSiliconFlow/openapi.json
Normal file
150
plugins/KolorsSiliconFlow/openapi.json
Normal file
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "SiliconFlow Image Generation API",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://api.siliconflow.cn/v1"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/images/generations": {
|
||||
"post": {
|
||||
"summary": "Generates an image based on a given prompt.",
|
||||
"operationId": "generateImage",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["model", "prompt", "image_size", "batch_size", "num_inference_steps", "guidance_scale"],
|
||||
"properties": {
|
||||
"model": {
|
||||
"type": "string",
|
||||
"enum": ["Kwai-Kolors/Kolors"],
|
||||
"description": "The name of the model to be used."
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"description": "A text description of the desired image."
|
||||
},
|
||||
"negative_prompt": {
|
||||
"type": "string",
|
||||
"description": "A description of elements you do not want in the generated image."
|
||||
},
|
||||
"image_size": {
|
||||
"type": "string",
|
||||
"enum": ["1024x1024", "960x1280", "768x1024", "720x1440", "720x1280", "others"],
|
||||
"description": "The size of the generated image."
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 4,
|
||||
"description": "The number of images to generate."
|
||||
},
|
||||
"num_inference_steps": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"description": "The number of inference steps."
|
||||
},
|
||||
"guidance_scale": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 20,
|
||||
"description": "A value that controls how closely the generated image aligns with the prompt."
|
||||
},
|
||||
"seed": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9999999999,
|
||||
"description": "The random seed used for image generation."
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"description": "An image to be uploaded, encoded in base64 format."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Image successfully generated.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The URL of the generated image, valid for one hour."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"timings": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"inference": {
|
||||
"type": "number",
|
||||
"description": "The time taken for inference."
|
||||
}
|
||||
}
|
||||
},
|
||||
"seed": {
|
||||
"type": "integer",
|
||||
"description": "The random seed used for image generation."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request."
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized."
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found."
|
||||
},
|
||||
"429": {
|
||||
"description": "Too many requests."
|
||||
},
|
||||
"503": {
|
||||
"description": "Service unavailable."
|
||||
},
|
||||
"504": {
|
||||
"description": "Gateway timeout."
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Authorization": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"Authorization": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "API Key"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
plugins/KolorsSiliconFlow/preview.png
Normal file
BIN
plugins/KolorsSiliconFlow/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 879 KiB |
Reference in New Issue
Block a user