Open klonhj2015 opened 1 month ago
Transferring this issue to azure-sdk-for-python as this looks to be Python code and not Java code.
The python code is just an example to show that openai python library support the array array input. But our java sdk do not support the input type
@alzimmermsft seems like this is an issue for Java. Do you want to transfer it back?
@alzimmermsft seems like this is an issue for Java. Do you want to transfer it back?
Yeah @xiangyan99, let's transfer this back to the Java repo. Thought it was specifically Python due to the sample code.
@mssfang could you follow-up on this
Thank you for bringing it up.
Currently, in the TypeSpec we take String[]
but from the OpenAI Spec, the input could be one of String
, array of String
, array of integer
or array of array of integer
.
I will bring it up to our TypeSpec meeting
Describe the bug openai service with version 1.0.0-beta.9 sdk
Embedding Model:text-embedding-ada-002
The Request param in sdk EmbeddingOptions do not support array[int] or array[array[int]] as OpenAI.
Python code with openai client = AzureOpenAI( azure_endpoint="YOUR_endpoint", api_key="Your API key", azure_deployment="Your deployment", api_version="2024-02-01" )
response = client.embeddings.create( model="text-embedding-ada-002", input=[[23123, 232,23, 4341]] )
print(response)