Edgewise API
Docs
GitHub
Preparing search index...
react
useChat
Function useChat
useChat
(
o
:
GenOpts
,
)
:
{
attach
:
(
b
:
Blob
)
=>
void
;
attachments
:
Blob
[]
;
error
:
EdgewiseError
|
null
;
input
:
string
;
isStreaming
:
boolean
;
messages
:
ChatMessage
[]
;
setInput
:
Dispatch
<
SetStateAction
<
string
>
>
;
setMessages
:
Dispatch
<
SetStateAction
<
ChatMessage
[]
>
>
;
stop
:
()
=>
void
|
undefined
;
submit
:
(
text
?:
string
)
=>
Promise
<
void
>
;
}
A chat with any generate model. Attachments work when the model accepts them.
Parameters
o
:
GenOpts
Returns
{
attach
:
(
b
:
Blob
)
=>
void
;
attachments
:
Blob
[]
;
error
:
EdgewiseError
|
null
;
input
:
string
;
isStreaming
:
boolean
;
messages
:
ChatMessage
[]
;
setInput
:
Dispatch
<
SetStateAction
<
string
>
>
;
setMessages
:
Dispatch
<
SetStateAction
<
ChatMessage
[]
>
>
;
stop
:
()
=>
void
|
undefined
;
submit
:
(
text
?:
string
)
=>
Promise
<
void
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Docs
GitHub
Edgewise API
Loading...
A chat with any generate model. Attachments work when the model accepts them.