Preparing search index...
The search index is not available
openai-advanced
openai-advanced
Chat
Class Chat
Hierarchy
Chat
Chat
Index
Constructors
constructor
Properties
json
Schema
Service
openai
Methods
add
Function
Parameter
add
Message
add
Messages
add
System
Message
add
User
Message
append
System
Message
define
Function
get
Formatted
Response
get
Function
Call
prompt
set
Function
Parameters
set
Model
set
Tools
Constructors
constructor
new
Chat
(
model
?
,
messages
?
,
tools
?
)
:
Chat
Parameters
model
:
string
= 'gpt-4o-2024-08-06'
messages
:
ChatCompletionMessageParam
[]
= []
tools
:
ChatCompletionTool
[]
= []
Returns
Chat
Properties
json
Schema
Service
json
Schema
Service
:
JsonSchemaService
= ...
openai
openai
:
OpenAI
= ...
Methods
add
Function
Parameter
add
Function
Parameter
(
propertyName
,
type
,
options
?
)
:
Chat
Parameters
propertyName
:
string
type
:
any
Optional
options
:
any
Returns
Chat
add
Message
add
Message
(
message
)
:
Chat
Parameters
message
:
ChatCompletionMessageParam
Returns
Chat
add
Messages
add
Messages
(
messages
)
:
Chat
Parameters
messages
:
ChatCompletionMessageParam
[]
Returns
Chat
add
System
Message
add
System
Message
(
content
)
:
Chat
Parameters
content
:
string
Returns
Chat
add
User
Message
add
User
Message
(
content
)
:
Chat
Parameters
content
:
string
Returns
Chat
append
System
Message
append
System
Message
(
content
)
:
Chat
Parameters
content
:
string
Returns
Chat
define
Function
define
Function
(
name
,
description
?
)
:
Chat
Parameters
name
:
string
Optional
description
:
string
Returns
Chat
get
Formatted
Response
get
Formatted
Response
(
name
,
type
,
description
?
)
:
Promise
<
any
>
Parameters
name
:
string
type
:
any
Optional
description
:
string
Returns
Promise
<
any
>
get
Function
Call
get
Function
Call
(
functionName
?
)
:
Promise
<
any
>
Parameters
Optional
functionName
:
string
Returns
Promise
<
any
>
prompt
prompt
(
functionName
?
,
response_format
?
)
:
Promise
<
ChatCompletion
&
{
_request_id
?:
null
|
string
;
}
>
Parameters
Optional
functionName
:
string
Optional
response_format
:
ResponseFormatJSONSchema
Returns
Promise
<
ChatCompletion
&
{
_request_id
?:
null
|
string
;
}
>
set
Function
Parameters
set
Function
Parameters
(
type
)
:
Chat
Parameters
type
:
any
Returns
Chat
set
Model
set
Model
(
model
)
:
Chat
Parameters
model
:
string
Returns
Chat
set
Tools
set
Tools
(
tools
)
:
void
Parameters
tools
:
ChatCompletionTool
[]
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
json
Schema
Service
openai
Methods
add
Function
Parameter
add
Message
add
Messages
add
System
Message
add
User
Message
append
System
Message
define
Function
get
Formatted
Response
get
Function
Call
prompt
set
Function
Parameters
set
Model
set
Tools
openai-advanced
Loading...