Unexpected end of JSON
Labels: name: area: embeddings, name: area: vector store, name: auto:bug, name: area: models, name: integration: pinecone

### System Info

npm version: "^0.0.203"
MacOS
Bun version: 1.0.15+b3bdf22eb


### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

The following code will cause this error:

```
import { Pinecone } from '@pinecone-database/pinecone';
import { VectorDBQAChain } from 'langchain/chains';
import { OpenAIEmbeddings } from 'langchain/embeddings/openai';
import { OpenAI } from 'langchain/llms/openai';
import { PineconeStore } from 'langchain/vectorstores/pinecone';

const pinecone = new Pinecone();

const indexKey = process.env.PINECONE_INDEX_KEY;

if (!indexKey) {
  throw new Error('PINECONE_INDEX_KEY is not set.');
}

const pineconeIndex = pinecone.Index(indexKey);

export async function queryDocuments(query: string, returnSourceDocuments = false) {
  const vectorStore = await PineconeStore.fromExistingIndex(
    new OpenAIEmbeddings({
      modelName: 'text-embedding-ada-002',
    }),
    {
      pineconeIndex,
    },
  );

  const model = new OpenAI({
    modelName: 'gpt-4-1106-preview',
  });

  const chain = VectorDBQAChain.fromLLM(model, vectorStore, {
    k: 5,
    returnSourceDocuments,
  });

  return await chain.call({ query });
}
```

The embeddings have been created and confirmed to exist in the Pinecone console, e.g.:

<img width="1240" alt="Screenshot 2023-12-08 at 13 46 24" src="https://github.com/langchain-ai/langchain/assets/1304307/66c23c7e-916a-461d-b8f6-28a7fa460300">


### Expected behavior

I would expect it to query the vector DB and correctly prompt GPT-4 with the results. But instead, I get the following error:

```
? Enter your query what is the third wave of dam
Creating query for "what is the third wave of dam"...
499 |             var _a;
500 |             return __generator(this, function (_b) {
501 |                 switch (_b.label) {
502 |                     case 0:
503 |                         _a = this.transformer;
504 |                         return [4 /*yield*/, this.raw.json()];
                                                   ^
SyntaxError: Unexpected end of JSON input
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:504:46
      at step (/Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:72:18)
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:53:53
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:47:9
      at new Promise (:1:21)
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:43:12
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/runtime.js:498:16
      at /Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/apis/VectorOperationsApi.js:405:46
      at step (/Users/andy/dev/runestone/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/apis/VectorOperationsApi.js:84:18)
```