Arize Phoenix TS
Preparing search index...
@arizeai/phoenix-client
schemas/llm/converters
toOpenAIToolDefinition
Function toOpenAIToolDefinition
toOpenAIToolDefinition
(
toolDefinition
:
unknown
,
)
:
|
{
function
:
{
description
?:
string
;
name
:
string
;
parameters
:
{
additionalProperties
?:
boolean
;
properties
:
Record
<
string
,
|
{
description
?:
string
;
enum
?:
string
[]
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"object"
|
"null"
|
"array"
|
"integer"
;
[
key
:
string
]:
unknown
;
}
|
{
anyOf
:
{
description
?:
string
;
enum
?:
(...)
[]
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"object"
|
"null"
|
"array"
|
"integer"
;
[
key
:
string
]:
unknown
;
}
[]
;
}
,
>
;
required
?:
string
[]
;
strict
?:
boolean
;
type
:
"object"
;
[
key
:
string
]:
unknown
;
}
;
[
key
:
string
]:
unknown
;
}
;
type
:
"function"
;
[
key
:
string
]:
unknown
;
}
|
null
Convert from any tool call format to OpenAI format if possible
Parameters
toolDefinition
:
unknown
Returns
|
{
function
:
{
description
?:
string
;
name
:
string
;
parameters
:
{
additionalProperties
?:
boolean
;
properties
:
Record
<
string
,
|
{
description
?:
string
;
enum
?:
string
[]
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"object"
|
"null"
|
"array"
|
"integer"
;
[
key
:
string
]:
unknown
;
}
|
{
anyOf
:
{
description
?:
string
;
enum
?:
(...)
[]
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"object"
|
"null"
|
"array"
|
"integer"
;
[
key
:
string
]:
unknown
;
}
[]
;
}
,
>
;
required
?:
string
[]
;
strict
?:
boolean
;
type
:
"object"
;
[
key
:
string
]:
unknown
;
}
;
[
key
:
string
]:
unknown
;
}
;
type
:
"function"
;
[
key
:
string
]:
unknown
;
}
|
null
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Arize Phoenix TS
Loading...
Convert from any tool call format to OpenAI format if possible