@@ -20,6 +20,7 @@ def create(
20
20
* ,
21
21
input : Union [str , List [str ], List [int ], List [List [int ]]],
22
22
model : Union [str , Literal ["text-embedding-ada-002" ]],
23
+ encoding_format : Literal ["float" , "base64" ] | NotGiven = NOT_GIVEN ,
23
24
user : str | NotGiven = NOT_GIVEN ,
24
25
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
25
26
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -45,6 +46,9 @@ def create(
45
46
[Model overview](https://platform.openai.com/docs/models/overview) for
46
47
descriptions of them.
47
48
49
+ encoding_format: The format to return the embeddings in. Can be either `float` or
50
+ [`base64`](https://pypi.org/project/pybase64/).
51
+
48
52
user: A unique identifier representing your end-user, which can help OpenAI to monitor
49
53
and detect abuse.
50
54
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
@@ -63,6 +67,7 @@ def create(
63
67
{
64
68
"input" : input ,
65
69
"model" : model ,
70
+ "encoding_format" : encoding_format ,
66
71
"user" : user ,
67
72
},
68
73
embedding_create_params .EmbeddingCreateParams ,
@@ -80,6 +85,7 @@ async def create(
80
85
* ,
81
86
input : Union [str , List [str ], List [int ], List [List [int ]]],
82
87
model : Union [str , Literal ["text-embedding-ada-002" ]],
88
+ encoding_format : Literal ["float" , "base64" ] | NotGiven = NOT_GIVEN ,
83
89
user : str | NotGiven = NOT_GIVEN ,
84
90
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
85
91
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -105,6 +111,9 @@ async def create(
105
111
[Model overview](https://platform.openai.com/docs/models/overview) for
106
112
descriptions of them.
107
113
114
+ encoding_format: The format to return the embeddings in. Can be either `float` or
115
+ [`base64`](https://pypi.org/project/pybase64/).
116
+
108
117
user: A unique identifier representing your end-user, which can help OpenAI to monitor
109
118
and detect abuse.
110
119
[Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
@@ -123,6 +132,7 @@ async def create(
123
132
{
124
133
"input" : input ,
125
134
"model" : model ,
135
+ "encoding_format" : encoding_format ,
126
136
"user" : user ,
127
137
},
128
138
embedding_create_params .EmbeddingCreateParams ,
0 commit comments