asco/get_emb.py
Jacob 2cb11e4933 Initial commit.
Yeah I know there are a lot of nonessential files but w/e.
2024-12-17 01:39:52 -05:00

6 lines
185 B
Python

import openai
def get_embedding(text, model="text-embedding-ada-002"):
client = openai.OpenAI();
return client.embeddings.create(input = [text], model=model).data[0].embedding