Skip to content

Commit

Permalink
Merge pull request #2 from AlboCode/hotfix/rabbithole-error
Browse files Browse the repository at this point in the history
Hotfix/rabbithole error
  • Loading branch information
AlboCode authored Nov 6, 2023
2 parents 39037ce + 747f438 commit 78cf792
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/CCatClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ public function rabbitHole(string $filePath, ?int $chunkSize, ?int $chunkOverlap
'multipart' => [
[
'name' => 'file',
'contents' => Utils::tryFopen($filePath, 'r'),
'filename' => 'custom_filename.txt'
'contents' => Utils::tryFopen($filePath, 'r')
],
]
]);
Expand Down
1 change: 0 additions & 1 deletion src/Clients/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ protected function beforeSecureRequest(): \Closure
if (!empty($this->apikey)) {
$request = $request->withHeader('access_token', $this->apikey);
}
$request = $request->withHeader('Content-Type', 'application/json');
};
}

Expand Down
9 changes: 2 additions & 7 deletions src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
use Albocode\CcatphpSdk\Clients\WSClient;


$cCatClient = new CCatClient(new WSClient('cheshire_cat_core'), new HttpClient('cheshire_cat_core'));
$cCatClient = new CCatClient(new WSClient('cheshire_cat_core'), new HttpClient('cheshire_cat_core', null, 'meow'));

$response = $cCatClient->deleteDeclarativeMemoryByMetadata(["source" => "FastAPI - Swagger UI.pdf"]);
//try {
// $response = $cCatClient->sendMessage(new Message('Hello message', 'user', []));
//} catch (Exception $e) {
// var_dump($e->getMessage());
//}
$response = $cCatClient->getMemoryCollection();

var_dump($response);

0 comments on commit 78cf792

Please sign in to comment.