Openai embedding
Classes:
Name | Description |
---|---|
OpenAIEmbedding |
|
Attributes:
Name | Type | Description |
---|---|---|
HAS_OPENAI |
|
Attributes¶
Classes¶
OpenAIEmbedding
¶
Bases: BaseEmbedding
Methods:
Name | Description |
---|---|
__init__ |
|
aembed |
|
aembed_batch |
|
embed |
Synchronous wrapper for |
embed_batch |
Synchronous wrapper for |
Attributes:
Name | Type | Description |
---|---|---|
api_key |
|
|
client |
|
|
dimension |
int
|
|
model |
|
Source code in pyagenity/store/embedding/openai_embedding.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
Attributes¶
Functions¶
__init__
¶
__init__(model='text-embedding-3-small', OPENAI_API_KEY=None)
Source code in pyagenity/store/embedding/openai_embedding.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
aembed
async
¶
aembed(text)
Source code in pyagenity/store/embedding/openai_embedding.py
54 55 56 57 58 59 60 61 62 |
|
aembed_batch
async
¶
aembed_batch(texts)
Source code in pyagenity/store/embedding/openai_embedding.py
44 45 46 47 48 49 50 51 52 |
|
embed
¶
embed(text)
Synchronous wrapper for aembed
that runs the async implementation.
Source code in pyagenity/store/embedding/base_embedding.py
16 17 18 |
|
embed_batch
¶
embed_batch(texts)
Synchronous wrapper for aembed_batch
that runs the async implementation.
Source code in pyagenity/store/embedding/base_embedding.py
7 8 9 |
|