Handbook
Glossary
>q ( question -- )
Vocabulary
openai
.
ui
Inputs
question
an
object
Outputs
None
Word description
Sends the question to OpenAI API. Intended for simple questions using the listener.
Definition
USING:
accessors
assocs
io
kernel
openai
sequences
ui.tools.common
ui.tools.listener
wrap.strings
;
IN:
openai.ui
:
>q
( question -- )
init-api-key
cheapest-openai-model
swap
<completion>
1000
>>max_tokens
create-completion
"choices"
of
first
"text"
of
listener-gadget
get-tool-dim
first
wrap-string
print
;