serve.prompters.base_prompter
BasePrompter
Bases: ABC
Source code in src/python/easydel/serve/prompters/base_prompter.py
7 8 9 10 11 12 13 14 15 16 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 |
|
__repr__()
The repr function is used to generate a string representation of an object. This function should return a string that can be parsed by the Python interpreter to recreate the object. The repr function is called when you use print() on an object, or when you type its name in the REPL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
self |
Refer to the instance of the class |
required |
Returns:
Type | Description |
---|---|
A string representation of the object |
Source code in src/python/easydel/serve/prompters/base_prompter.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
__str__()
The str function is called when you use the print function or when str() is used. It should return a string representation of the object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
self |
Refer to the instance of the class |
required |
Returns:
Type | Description |
---|---|
The object's string representation |
Source code in src/python/easydel/serve/prompters/base_prompter.py
103 104 105 106 107 108 109 110 111 |
|