Commit 9801e91
committed
feat(tracer): enhance conditional imports and type hinting for Mistral integration
- Implemented conditional import handling for the `mistralai` library, allowing for graceful degradation when the library is not installed.
- Improved type hints using forward references for `mistralai` types to enhance code clarity and maintainability.
- Introduced an informative error message when the `mistralai` library is missing, guiding users on how to install it.
- This update ensures better compatibility and user experience when working with optional dependencies in the Mistral integration.1 parent eda36c0 commit 9801e91
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
17 | | - | |
18 | | - | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
45 | 57 | | |
46 | 58 | | |
47 | 59 | | |
| |||
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
187 | | - | |
| 199 | + | |
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
| |||
231 | 243 | | |
232 | 244 | | |
233 | 245 | | |
234 | | - | |
| 246 | + | |
235 | 247 | | |
236 | 248 | | |
237 | 249 | | |
| |||
0 commit comments