Issue: Pinecone.from_documents cannot run on AWS Lambda because of multiprocessing
Labels: name: area: vector store, name: auto:bug, name: integration: pinecone, name: integration: aws

### Issue you'd like to raise.

I am writing a few apps that use LangChain and deploying them to AWS Lambda. My previous 2 lambdas are running smoothly, but the one I'm trying to deploy this week is giving me the following stack trace when the lambda is run:

```  "errorMessage": "[Errno 38] Function not implemented",
  "errorType": "OSError",
  "requestId": "23ef7a93-3d00-475c-b495-421810f93d92",
  "stackTrace": [
    "  File \"/var/task/datadog_lambda/wrapper.py\", line 214, in __call__\n    self.response = self.func(event, context, **kwargs)\n",
    "  File \"/var/task/app.py\", line 4, in lambda_handler\n    total_indexed_pages = get_latest_changes()\n",
    "  File \"/var/task/ddtrace/contrib/aws_lambda/patch.py\", line 115, in __call__\n    self.response = self.func(*args, **kwargs)\n",
    "  File \"/var/task/app.py\", line 4, in lambda_handler\n    total_indexed_pages = get_latest_changes()\n",
    "  File \"/var/task/index_latest_docs.py\", line 137, in get_latest_changes\n    raise e\n",
    "  File \"/var/task/index_latest_docs.py\", line 126, in get_latest_changes\n    Pinecone.from_documents(docs, embedding=embeddings, index_name=PINECONE_INDEX_NAME, namespace=PINECONE_NAMESPACE)\n",
    "  File \"/var/task/langchain/schema/vectorstore.py\", line 420, in from_documents\n    return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)\n",
    "  File \"/var/task/langchain/vectorstores/pinecone.py\", line 416, in from_texts\n    pinecone.add_texts(\n",
    "  File \"/var/task/langchain/vectorstores/pinecone.py\", line 138, in add_texts\n    async_res = [\n",
    "  File \"/var/task/langchain/vectorstores/pinecone.py\", line 139, in <listcomp>\n    self._index.upsert(\n",
    "  File \"/var/task/pinecone/core/utils/error_handling.py\", line 17, in inner_func\n    return func(*args, **kwargs)\n",
    "  File \"/var/task/pinecone/index.py\", line 150, in upsert\n    return self._upsert_batch(vectors, namespace, _check_type, **kwargs)\n",
    "  File \"/var/task/pinecone/index.py\", line 237, in _upsert_batch\n    return self._vector_api.upsert(\n",
    "  File \"/var/task/pinecone/core/client/api_client.py\", line 776, in __call__\n    return self.callable(self, *args, **kwargs)\n",
    "  File \"/var/task/pinecone/core/client/api/vector_operations_api.py\", line 956, in __upsert\n    return self.call_with_http_info(**kwargs)\n",
    "  File \"/var/task/pinecone/core/client/api_client.py\", line 838, in call_with_http_info\n    return self.api_client.call_api(\n",
    "  File \"/var/task/pinecone/core/client/api_client.py\", line 421, in call_api\n    return self.pool.apply_async(self.__call_api, (resource_path,\n",
    "  File \"/var/task/pinecone/core/client/api_client.py\", line 107, in pool\n    self._pool = ThreadPool(self.pool_threads)\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/pool.py\", line 930, in __init__\n    Pool.__init__(self, processes, initializer, initargs)\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/pool.py\", line 196, in __init__\n    self._change_notifier = self._ctx.SimpleQueue()\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/context.py\", line 113, in SimpleQueue\n    return SimpleQueue(ctx=self.get_context())\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/queues.py\", line 341, in __init__\n    self._rlock = ctx.Lock()\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/context.py\", line 68, in Lock\n    return Lock(ctx=self.get_context())\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/synchronize.py\", line 167, in __init__\n    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)\n",
    "  File \"/var/lang/lib/python3.11/multiprocessing/synchronize.py\", line 57, in __init__\n    sl = self._semlock = _multiprocessing.SemLock
```

On line 126 in my index_latest_docs.py file, I have the following line:
`Pinecone.from_documents(docs, embedding=embeddings, index_name=PINECONE_INDEX_NAME, namespace=PINECONE_NAMESPACE)`

This is causing it to not run in AWS Lambda because Lambda cannot handle multiprocessing, which the function seems to be doing internally. 
I don't know if this is a newly introduced issue, because I'm using the same exact function in my other lambda apps, and they seem to be running fine - but maybe the containers were built with a different version than this more recent one.

Any help would be greatly appreciated


### Suggestion:

_No response_