Create Embedding Model
User Intent
Operation
TypeScript
import { Graphlit } from 'graphlit-client';
import { ModelServiceTypes, OpenAiModels, SpecificationTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
// 1) Create a text-embedding specification
const spec = await graphlit.createSpecification({
name: 'OpenAI Embedding 3 Large',
type: SpecificationTypes.TextEmbedding,
serviceType: ModelServiceTypes.OpenAi,
openAI: {
model: OpenAiModels.Embedding_3Large,
chunkTokenLimit: 512,
},
});
// 2) Set it as the project default text embedding strategy
await graphlit.updateProject({
embeddings: {
textSpecification: { id: spec.createSpecification.id },
},
});Python
C#
Last updated