Skip to content

Commit 8bbebcc

Browse files
committed
add post memory point
1 parent be24868 commit 8bbebcc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/CCatClient.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ public function rabbitHoleWeb(string $webUrl, ?int $chunkSize, ?int $chunkOverla
125125
}
126126

127127

128+
public function postMemoryPoint(string $collection, string $content, array $metadata): array
129+
{
130+
$response = $this->httpClient->getHttpClient()->post("/memory/collections/{$collection}/points", [
131+
'json' => [
132+
'content' => $content,
133+
'metadata' => $metadata
134+
]
135+
]);
136+
137+
return json_decode($response->getBody()->getContents(), true);
138+
}
139+
128140
public function getAllowedMimeTypes(): AllowedMimeTypesOutput
129141
{
130142
$response = $this->httpClient->getHttpClient()->get(sprintf('/rabbithole/allowed-mimetypes'));

0 commit comments

Comments
 (0)