|
3 | 3 | # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb. |
4 | 4 |
|
5 | 5 | # %% auto 0 |
6 | | -__all__ = ['effort', 'mk_msg', 'mk_msgs', 'stream_with_complete', 'cite_footnote', 'cite_footnotes', 'Chat', 'astream_result', |
7 | | - 'AsyncChat', 'aformat_stream', 'adisplay_stream'] |
| 6 | +__all__ = ['effort', 'mk_msg', 'mk_msgs', 'stream_with_complete', 'lite_mk_func', 'cite_footnote', 'cite_footnotes', 'Chat', |
| 7 | + 'astream_result', 'AsyncChat', 'aformat_stream', 'adisplay_stream'] |
8 | 8 |
|
9 | 9 | # %% ../nbs/00_core.ipynb |
10 | 10 | import asyncio, base64, json, litellm, mimetypes |
@@ -121,7 +121,7 @@ def stream_with_complete(gen, postproc=noop): |
121 | 121 | return stream_chunk_builder(chunks) |
122 | 122 |
|
123 | 123 | # %% ../nbs/00_core.ipynb |
124 | | -def _lite_mk_func(f): |
| 124 | +def lite_mk_func(f): |
125 | 125 | if isinstance(f, dict): return f |
126 | 126 | return {'type':'function', 'function':get_schema(f, pname='parameters')} |
127 | 127 |
|
@@ -172,7 +172,7 @@ def __init__( |
172 | 172 | hist,tools = mk_msgs(hist),listify(tools) |
173 | 173 | if ns is None and tools: ns = mk_ns(tools) |
174 | 174 | elif ns is None: ns = globals() |
175 | | - self.tool_schemas = [_lite_mk_func(t) for t in tools] if tools else None |
| 175 | + self.tool_schemas = [lite_mk_func(t) for t in tools] if tools else None |
176 | 176 | store_attr() |
177 | 177 |
|
178 | 178 | def _prep_msgs(self, msgs=None, prefill=None): |
|
0 commit comments