Call the assistant API
import io.github.quafadas.dairect.*
import cats.effect.IO
val (vsApi, _) = VectorStoreApi.defaultAuthLogToFile(fs2.io.file.Path("vectorStore.txt")).allocated.Ø
// vsApi: VectorStoreApi = io.github.quafadas.dairect.VectorStoreApi$proxy$1@30f307a8
val (vsFilesApi, _) = VectorStoreFilesApi.defaultAuthLogToFile(fs2.io.file.Path("vectorStore.txt")).allocated.Ø
// vsFilesApi: VectorStoreFilesApi = io.github.quafadas.dairect.VectorStoreFilesApi$proxy$1@50dcf8e7
val allVs = vsApi.list().Ø
// allVs: VectorStoreList = VectorStoreList(
// object = "list",
// data = List(
// VectorStore(
// id = "vs_skJUCFj83DLnhOGOfmy7CrQi",
// object = "vector_store",
// created_at = 1724178419L,
// name = None,
// bytes = None,
// file_counts = FileCounts(
// in_progress = 0,
// completed = 1,
// failed = 0,
// cancelled = 0,
// total = 1
// ),
// status = "completed"
// ),
// VectorStore(
// id = "vs_DxCIvlDZimJBaINKBkkBxbM1",
// object = "vector_store",
// created_at = 1724178419L,
// name = None,
// bytes = None,
// file_counts = FileCounts(
// in_progress = 0,
// completed = 0,
// failed = 0,
// cancelled = 0,
// total = 0
// ),
// status = "completed"
// ),
// VectorStore(
// id = "vs_IdOnnLdJ42JlzIasKRQwHpNC",
// object = "vector_store",
// created_at = 1724178382L,
// name = None,
// bytes = None,
// file_counts = FileCounts(
// in_progress = 0,
// completed = 0,
// failed = 0,
// cancelled = 0,
// total = 0
// ),
// status = "completed"
// ),
// VectorStore(
// ...
val allvsf = vsFilesApi.list(allVs.data.head.id).Ø
// allvsf: VectorStoreFileList = VectorStoreFileList(
// object = "list",
// data = List(
// VectorStoreFileShort(
// id = "file-uX8cSDgHlfORGsgqQIko6ofd",
// object = "vector_store.file",
// created_at = 1724312581L,
// vector_store_id = "vs_skJUCFj83DLnhOGOfmy7CrQi"
// )
// ),
// first_id = "file-uX8cSDgHlfORGsgqQIko6ofd",
// last_id = "file-uX8cSDgHlfORGsgqQIko6ofd",
// has_more = false
// )
val file = vsFilesApi.get(allVs.data.head.id, allvsf.data.head.id).Ø
// file: VectorStoreFile = VectorStoreFile(
// id = "file-uX8cSDgHlfORGsgqQIko6ofd",
// object = "vector_store.file",
// usage_bytes = 4573L,
// created_at = 1724312581L,
// vector_store_id = "vs_skJUCFj83DLnhOGOfmy7CrQi",
// status = "completed",
// last_error = None,
// chunking_strategy = ChunkingStrategy(
// type = "static",
// static = Some(
// value = StaticChunkingStrategy(
// max_chunk_size_tokens = 800,
// chunk_overlap_tokens = 400
// )
// )
// )
// )
/** vsFilesApi.create(allVs.data.head.id, allFiles.data.head.id).Ø
*
* vsFilesApi.delete(allVsf.data.head.id).Ø
*/