import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.vectorStores.getFile({
vectorStoreId: "vs_abc123",
fileId: "file-abc123",
});
console.log(result);
}
run();{
"id": "file-abc123",
"object": "vector_store.file",
"usage_bytes": 256000,
"created_at": 1704067200,
"vector_store_id": "vs_abc123",
"status": "completed",
"last_error": null,
"chunking_strategy": {
"type": "auto"
},
"attributes": {
"category": "manual",
"version": "2.0"
}
}Retrieves detailed information about a specific file within a vector store.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.vectorStores.getFile({
vectorStoreId: "vs_abc123",
fileId: "file-abc123",
});
console.log(result);
}
run();{
"id": "file-abc123",
"object": "vector_store.file",
"usage_bytes": 256000,
"created_at": 1704067200,
"vector_store_id": "vs_abc123",
"status": "completed",
"last_error": null,
"chunking_strategy": {
"type": "auto"
},
"attributes": {
"category": "manual",
"version": "2.0"
}
}Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.
Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.
The ID of the vector store that the file belongs to.
The ID of the file being retrieved.
OK
A list of files attached to a vector store.
The identifier, which can be referenced in API endpoints.
The object type, which is always 'vector_store.file'.
The total vector store usage in bytes. Note that this may be different from the original file size.
-9007199254740991 <= x <= 9007199254740991The Unix timestamp (in seconds) for when the vector store file was created.
-9007199254740991 <= x <= 9007199254740991The ID of the vector store that the File is attached to.
The status of the vector store file. 'in_progress' means currently processing, 'completed' indicates the file is ready for use, 'cancelled' means processing was cancelled, 'failed' means an error occurred.
in_progress, completed, cancelled, failed The last error associated with this vector store file. Will be null if there are no errors.
Show child attributes
The strategy used to chunk the file.
Show child attributes
Set of 16 key-value pairs that can be attached to an object. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
Show child attributes
Was this page helpful?