|
1 | 1 | <a id="camel.models.base_model"></a> |
2 | 2 |
|
| 3 | +<a id="camel.models.base_model._StreamLogger"></a> |
| 4 | + |
| 5 | +## _StreamLogger |
| 6 | + |
| 7 | +```python |
| 8 | +class _StreamLogger: |
| 9 | +``` |
| 10 | + |
| 11 | +Base for stream logging wrappers. |
| 12 | + |
| 13 | +<a id="camel.models.base_model._StreamLogger.__init__"></a> |
| 14 | + |
| 15 | +### __init__ |
| 16 | + |
| 17 | +```python |
| 18 | +def __init__(self, log_path: Optional[str], log_enabled: bool): |
| 19 | +``` |
| 20 | + |
| 21 | +<a id="camel.models.base_model._StreamLogger._collect"></a> |
| 22 | + |
| 23 | +### _collect |
| 24 | + |
| 25 | +```python |
| 26 | +def _collect(self, chunk: ChatCompletionChunk): |
| 27 | +``` |
| 28 | + |
| 29 | +<a id="camel.models.base_model._StreamLogger._log"></a> |
| 30 | + |
| 31 | +### _log |
| 32 | + |
| 33 | +```python |
| 34 | +def _log(self): |
| 35 | +``` |
| 36 | + |
| 37 | +<a id="camel.models.base_model._SyncStreamWrapper"></a> |
| 38 | + |
| 39 | +## _SyncStreamWrapper |
| 40 | + |
| 41 | +```python |
| 42 | +class _SyncStreamWrapper(_StreamLogger): |
| 43 | +``` |
| 44 | + |
| 45 | +Sync stream wrapper with logging. |
| 46 | + |
| 47 | +<a id="camel.models.base_model._SyncStreamWrapper.__init__"></a> |
| 48 | + |
| 49 | +### __init__ |
| 50 | + |
| 51 | +```python |
| 52 | +def __init__( |
| 53 | + self, |
| 54 | + stream: Stream[ChatCompletionChunk], |
| 55 | + log_path: Optional[str], |
| 56 | + log_enabled: bool |
| 57 | +): |
| 58 | +``` |
| 59 | + |
| 60 | +<a id="camel.models.base_model._SyncStreamWrapper.__iter__"></a> |
| 61 | + |
| 62 | +### __iter__ |
| 63 | + |
| 64 | +```python |
| 65 | +def __iter__(self): |
| 66 | +``` |
| 67 | + |
| 68 | +<a id="camel.models.base_model._SyncStreamWrapper.__next__"></a> |
| 69 | + |
| 70 | +### __next__ |
| 71 | + |
| 72 | +```python |
| 73 | +def __next__(self): |
| 74 | +``` |
| 75 | + |
| 76 | +<a id="camel.models.base_model._SyncStreamWrapper.__enter__"></a> |
| 77 | + |
| 78 | +### __enter__ |
| 79 | + |
| 80 | +```python |
| 81 | +def __enter__(self): |
| 82 | +``` |
| 83 | + |
| 84 | +<a id="camel.models.base_model._SyncStreamWrapper.__exit__"></a> |
| 85 | + |
| 86 | +### __exit__ |
| 87 | + |
| 88 | +```python |
| 89 | +def __exit__(self, *_): |
| 90 | +``` |
| 91 | + |
| 92 | +<a id="camel.models.base_model._SyncStreamWrapper.__del__"></a> |
| 93 | + |
| 94 | +### __del__ |
| 95 | + |
| 96 | +```python |
| 97 | +def __del__(self): |
| 98 | +``` |
| 99 | + |
| 100 | +<a id="camel.models.base_model._AsyncStreamWrapper"></a> |
| 101 | + |
| 102 | +## _AsyncStreamWrapper |
| 103 | + |
| 104 | +```python |
| 105 | +class _AsyncStreamWrapper(_StreamLogger): |
| 106 | +``` |
| 107 | + |
| 108 | +Async stream wrapper with logging. |
| 109 | + |
| 110 | +<a id="camel.models.base_model._AsyncStreamWrapper.__init__"></a> |
| 111 | + |
| 112 | +### __init__ |
| 113 | + |
| 114 | +```python |
| 115 | +def __init__( |
| 116 | + self, |
| 117 | + stream: AsyncStream[ChatCompletionChunk], |
| 118 | + log_path: Optional[str], |
| 119 | + log_enabled: bool |
| 120 | +): |
| 121 | +``` |
| 122 | + |
| 123 | +<a id="camel.models.base_model._AsyncStreamWrapper.__aiter__"></a> |
| 124 | + |
| 125 | +### __aiter__ |
| 126 | + |
| 127 | +```python |
| 128 | +def __aiter__(self): |
| 129 | +``` |
| 130 | + |
| 131 | +<a id="camel.models.base_model._AsyncStreamWrapper.__del__"></a> |
| 132 | + |
| 133 | +### __del__ |
| 134 | + |
| 135 | +```python |
| 136 | +def __del__(self): |
| 137 | +``` |
| 138 | + |
3 | 139 | <a id="camel.models.base_model.ModelBackendMeta"></a> |
4 | 140 |
|
5 | 141 | ## ModelBackendMeta |
|
0 commit comments