gpt-4o
to work out what’s in this picture:
The image depicts a serene landscape featuring a wooden pathway that extends into the distance, cutting through a lush green field. The field is filled with tall grasses and a variety of low-lying shrubs and bushes. In the background, there are scattered trees, and the sky above is a clear blue with some wispy clouds. The scene exudes a calm, peaceful, and natural atmosphere.Let’s do the same with
claude-3-sonnet
, with a different image this time:
The image shows a close-up view of an ant. The ant appears to be a large black carpenter ant species. The ant is standing on a light-colored surface, with its mandibles open and antennae extended. The image captures intricate details of the ant’s body segments and legs. The background has a reddish-brown hue, creating a striking contrast against the dark coloration of the ant. This macro photography shot highlights the remarkable structure and form of this small insect in great detail.
signature
specifying how the API was called (Unify Python Client, NodeJS client, Console etc.)use_custom_keys
specifying whether to use custom keys or the unified keys with the provider.tags
: to mark a prompt with string-metadata which can be used for filtering later on.drop_params
: in case arguments passed aren’t supported by certain providers, uses thisregion
: the region where the endpoint is accessed, only relevant for certain providers like vertex-ai
and aws-bedrock
.curl
request like so:
curl
request like so:
curl
request like so:
extra_headers
argument, extra_query
argument,
and direct **kwargs
of the generate
function, respectively.
For arguments which are part of the OpenAI standard and also another provider standard,
then only the OpenAI behaviour is supported.
For example, messages
is an argument used in the APIs of both OpenAI and Anthropic ,
as can be seen here
and here respectively.
Any provider-specific aspects of this argument (different to OpenAI behaviour) are
therefore not supported, and only the OpenAI behaviour is supported.
As an example, the following example works with Anthropic:
top_k
argument, which isn’t provided by OpenAI.
If you include this argument, it will be sent straight to the model.
If you send this argument to a provider that does not support top_k
, you will get an error.
generate
function of the various derivative clients, such as Unify
and AsyncUnify
.
temperature=0.5
to all subsequent requests,
without needing to be repeatedly passed into the .generate()
method.
.generate()
method will override (but not overwrite) the default value specified
for the client.
set_<some_parameter>
returns self
: