🐛 Bug: Fix the bug where the embedding model cannot receive arrays.
Browse files
models.py
CHANGED
|
@@ -112,7 +112,7 @@ class ImageGenerationRequest(BaseRequest):
|
|
| 112 |
stream: bool = False
|
| 113 |
|
| 114 |
class EmbeddingRequest(BaseRequest):
|
| 115 |
-
input: str
|
| 116 |
model: str
|
| 117 |
encoding_format: Optional[str] = "float"
|
| 118 |
stream: bool = False
|
|
|
|
| 112 |
stream: bool = False
|
| 113 |
|
| 114 |
class EmbeddingRequest(BaseRequest):
|
| 115 |
+
input: Union[str, List[Union[str, int, List[int]]]] # 支持字符串或数组
|
| 116 |
model: str
|
| 117 |
encoding_format: Optional[str] = "float"
|
| 118 |
stream: bool = False
|