Create Embedding for a Set
Embeddings are required in order to use Certara GPT to generate content off a specific document or set of documents.
Pre-Reqs
We will need a setId
before we can create the embeddings, we will be using the variable created in Create a Document Set
We will be using the same header from Define Your Header.
Check Your Imported Modules
Make sure you have imported the
requests
andjson
module before proceeding with this guide.
Request Embedding Creation
We can jump right into creating our request, since a body is not required for an embedding to be created.
setId = 'AY6uy7o0U0xLUebQHDvZ'
createSetEmbeddingUrl = f'{envUrl}/layar/savedLists/{setId}/createEmbeddings'
response = requests.post(createSetEmbeddingUrl,
headers = header)
print(response.text) #Optional
The printed response will be "200" which indicates the embedding was created.
Updated 7 months ago