chat
Chat
Utility for running a chat with a Structure.
Attributes:
Name | Type | Description |
---|---|---|
structure |
Structure
|
The Structure to run. |
exit_keywords |
list[str]
|
Keywords that will exit the chat. |
exiting_text |
str
|
Text to display when exiting the chat. |
processing_text |
str
|
Text to display while processing the user's input. |
intro_text |
Optional[str]
|
Text to display when the chat starts. |
prompt_prefix |
str
|
Prefix for the user's input. |
response_prefix |
str
|
Prefix for the assistant's response. |
handle_input |
Callable[[str], str]
|
Function to get the user's input. |
handle_output |
Callable[..., None]
|
Function to output text. Takes a |
Source code in griptape/utils/chat.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|