forked from openai-php/client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVectorStore.php
More file actions
87 lines (83 loc) · 2.07 KB
/
VectorStore.php
File metadata and controls
87 lines (83 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/**
* @return array<string, mixed>
*/
function vectorStoreResource(): array
{
return [
'id' => 'vs_8VE2cQq1jTFlH7FizhYCzUz0',
'object' => 'vector_store',
'name' => 'Product Knowledge Base',
'description' => 'A knowledge base for product information.',
'status' => 'completed',
'usage_bytes' => 29882,
'created_at' => 1715953317,
'file_counts' => [
'in_progress' => 0,
'completed' => 1,
'failed' => 0,
'cancelled' => 0,
'total' => 1,
],
'metadata' => [],
'expires_after' => null,
'expires_at' => null,
'last_active_at' => 1715953317,
];
}
/**
* @return array<string, mixed>
*/
function vectorStoreWithExpiresAfterResource(): array
{
return [
'id' => 'vs_8VE2cQq1jTFlH7FizhYCzUz0',
'object' => 'vector_store',
'name' => 'Product Knowledge Base',
'description' => 'A knowledge base for product information.',
'status' => 'completed',
'usage_bytes' => 29882,
'created_at' => 1715953317,
'file_counts' => [
'in_progress' => 0,
'completed' => 1,
'failed' => 0,
'cancelled' => 0,
'total' => 1,
],
'metadata' => [],
'expires_after' => [
'anchor' => 'last_active_at',
'days' => 7,
],
'expires_at' => null,
'last_active_at' => 1715953317,
];
}
/**
* @return array<string, mixed>
*/
function vectorStoreListResource(): array
{
return [
'object' => 'list',
'data' => [
vectorStoreResource(),
vectorStoreResource(),
],
'first_id' => 'vs_8VE2cQq1jTFlH7FizhYCzUz0',
'last_id' => 'vs_8VE2cQq1jTFlH7FizhYCzUz0',
'has_more' => false,
];
}
/**
* @return array<string, mixed>
*/
function vectorStoreDeleteResource(): array
{
return [
'id' => 'vs_xzlnkCbIQE50B9A8RzmcFmtP',
'object' => 'vector_store.deleted',
'deleted' => true,
];
}