chat
chat(prompt, stream=True, preview=False, **kwargs)
Interact with the LLM via the console
Details
Easily interact with an LLM by simply passing a prompt as an argument
Parameters
Name | Type | Description | Default |
---|---|---|---|
prompt |
The request to be sent to the model. | required | |
stream |
Process the response from the LLM as a stream of text instead of waiting for the entire response to complete before displaying. Defaults to True. | True |
|
preview |
If True, returns what it will be sent to the LLM. Defaults to False. | False |
|
**kwargs |
Arguments to override the defaults. Such as the ‘model’, amd ‘system_msg’ | {} |
Examples
import chapy
"How do I create a plot?") chapy.chat(