public class FileService extends Object
| Constructor and Description |
|---|
FileService(FileAPI api) |
| Modifier and Type | Method and Description |
|---|---|
RetrieveFileResp |
retrieve(RetrieveFileReq req) |
UploadFileResp |
upload(UploadFileReq req)
Upload files to Coze platform.
|
public FileService(FileAPI api)
public UploadFileResp upload(UploadFileReq req)
Local files cannot be used directly in messages. Before creating messages or conversations, you need to call this interface to upload local files to the platform first. After uploading the file, you can use it directly in multimodal content in messages by specifying the file_id.
docs en: https://www.coze.com/docs/developer_guides/upload_files docs zh: https://www.coze.cn/docs/developer_guides/upload_files
public RetrieveFileResp retrieve(RetrieveFileReq req)
Copyright © 2025. All rights reserved.