Open
Description
Is this a new bug?
- I believe this is a new bug
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Hi, i can not run this example
npm run index
> [email protected] index
> tsx -r dotenv/config src/index.ts
(node:331448) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/tsx/dist/loader.js", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
╔════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╗
║ │ date │ year │ month │ day │ author │ title │ article │ url │ section │ publication ║
╟────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 7 │ 2018-05-02 17:0… │ 2018 │ 5 │ 2 │ Caroline Willia… │ You Can Trick Y… │ If only every d… │ https://www.vic… │ Health │ Vice ║
╟────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 11 │ 2019-06-23 00:0… │ 2019 │ 6 │ 23 │ Jessica DiNapol… │ Hudson's Bay's … │ (Reuters) - The… │ https://www.reu… │ Business News │ Reuters ║
╟────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 18 │ 2017-06-19 17:5… │ 2017 │ 6 │ 19 │ Linda Yang │ Girl Scouts Are… │ In the past, G… │ https://www.vic… │ Identity │ Vice ║
╟────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 22 │ 2018-12-28 00:0… │ 2018 │ 12 │ 28 │ Imani Moise │ Wells Fargo to … │ NEW YORK (Reute… │ https://www.reu… │ Business News │ Reuters ║
╟────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 23 │ 2018-05-17 18:3… │ 2018 │ 5 │ 17 │ Paige Mehrer │ 'Bendy Bone,' T… │ Check out mor… │ https://www.vic… │ Comics! │ Vice ║
╚════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
PineconeUnmappedHttpError: An unexpected error occured while calling the https://controller.###my-environment###.pinecone.io/databases endpoint. Failed to deserialize the JSON body into the target type: missing field `metric` at line 1 column 50 Status: 422.
at mapHttpStatusError (/home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/@pinecone-database/pinecone/dist/errors/http.js:137:19)
at <anonymous> (/home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/@pinecone-database/pinecone/dist/errors/handling.js:80:66)
at step (/home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/@pinecone-database/pinecone/dist/errors/handling.js:33:23)
at Object.next (/home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/@pinecone-database/pinecone/dist/errors/handling.js:14:53)
at fulfilled (/home/smag/dev/solid_pinecone/recommender-example-typescript/node_modules/@pinecone-database/pinecone/dist/errors/handling.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Expected Behavior
should insert to pinecone
Steps To Reproduce
npm install
npm run index
Relevant log output
No response
Environment
- **OS**:
- **Language version**:
- **Pinecone client version**:
Additional Context
seems to be quit similar to pinecone-io/semantic-search-example#6, adding metric: "cosine" in createIndex resolve this issue
No response