Run vlm-1
with the OpenAI Python SDK with just 2 lines of code change.
client.chat.completions.create
method is the extra_body
field that allows you to specify the domain
and additional request metadata
.
For example:
extra_body
field allows you to specify additional request metadata that is used by the VLM Run API (outside of the OpenAI Python SDK), as indicated by the vlmrun
field. This metadata is used to specify the domain
, json_schema
, and request metadata
(see below).
For example, the following code specifies the domain
, json_schema
, and request metadata
:
extra_body
keyword argument. For example, the VLM Run API accepts the following request metadata:
vlmrun.metadata
fields:
environment
(dev
, staging
, prod
): This property specifies the environment in which the request is being made. This can be useful for tracking requests across different environments. By default, this property is set to prod
.session_id
: This property is a string identifier for the session, which can be used to track requests across different sessions.allow_training
: This property flags the request as a potential candidate for our training dataset. If set to true
, the request may be used for training our base models. If set to false
, the request will be used for inference only. By default, this property is set to true
.detail
: The detail
field in image_url
objects is not currently supported. We will be adding support for this feature in the near future.max_tokens
: The max_tokens
field in chat.completions.create
is currently not respected by our server. This means that in case the token outputs exceed the limit, the server will still return the full output.logprobs
, logit_bias
, top_logprobs
, presence_penalty
, frequency_penalty
, n
, stream
, stop
: These fields are not currently supported by the VLM Run API. We will be adding support for these features in the near future.