-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
feature requestNew feature or requestNew feature or request
Description
🚀 The feature, motivation and pitch
would it be possible to support image_embeds
in openai protocol api as well? And prefix-caching shall be supported via following proposal. thanks.
So users can pass
{
"type": "image_url",
"image_url": {
"image_url": {"url": f"data:image/embeds;base64,{base64_image}"},
}
}
use base64 or other more efficient compression method?
import base64
import numpy as np
def encode_base64(arr):
return base64.b64encode(arr.astype(np.float32).tobytes()).decode('utf-8')
def decode_base64(encoded_str, shape):
decoded = base64.b64decode(encoded_str)
return np.frombuffer(decoded, dtype=np.float32).reshape(shape)
cc @youkaichao
Alternatives
No response
Additional context
No response
Before submitting a new issue...
- Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request