PHP code example of adrianmejias / pinecone
1. Go to this page and download the library: Download adrianmejias/pinecone library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
adrianmejias / pinecone example snippets
use AdrianMejias\Pinecone\Facades\Pinecone;
// Create an index
$response = Pinecone::index('my-index')->create([
'metric' => 'cosine',
'pods' => 1,
'replicas' => 1,
'pod_type' => 'p1.x1',
]);
// Query with namespace
$response = Pinecone::vector('my-index')->namespace('my-namespace')->query(10);
bash
php artisan vendor:publish --provider="AdrianMejias\Pinecone\PineconeServiceProvider" --tag="config"