Commit 851e5b6
Develop (#216)
* chore: Provider Unit Tests (#173)
* chore: added unit tests for core provider. small bugfix on calculate_metrics of provider
* added unit tests and docstring for join chunks
* added unit tests and docstrings for calculate_cost on provider
* added unit tests and docstrings for input_to_string on provider
* added unit tests and docstrings for chat and achat
* added unit tests and docstrings for chat and achat
* chore: cleaned provider unit tests
* chore: separated provider tests into different files. fixed some of its tests
* chore: linted code
* chore: deleted some comments
* chore: linted
* chore: Added Azure Provider Unit Tests (#176)
* chore: added unit tests for azure provider
* chore: added more unit tests and docstrings on azure, removed redundant comments
* chore: added unit tests for generate client on Azure Provider
* chore: separated azure unit tests into separate files. fixed some of its tests.
* chore: linted code
* chore: new line
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
---------
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
Co-authored-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
* [fix] bump prerelease version in pyproject.toml
* chore: rename action
* feat: added action to run tests on PR
* chore: comments
* fix: fix azure config tests
* chore: style format
* fix: tests workflow
* Feature/prompt management (#200)
* [feat] prompt management
* [feat] testing
* [feat] only one active prompt
* [fix] bump prerelease version in pyproject.toml
* [bugfix] return empty prompt
* [fix] bump prerelease version in pyproject.toml
* Update CONTRIBUTING.md
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
* Feat/ Use Openai Usage to calculate Cache and Reasoning Costs (#199)
* feat: collects usage from stream and non stream openai calls
* chore: refactored to provider to have a Metrics obj
* feat: calculate_metrics now takes into account cached & reasoning tokens. Prices of openai models updated
* fix: added caching tokens to model config obj
* chore: added integration test for cache and reasoning
* chore: added integration test for usage retrieval when max tokens reached
* chore: uncommented runs from examples/core.py
* fix: bugfix regarding usage on function calling. added a test for this
* chore: merged with develop
* chore: extracted provider data structures to another file
* chore: renamed to private methods some within provider. splitted integration tests into 2 files
* chore: deletion of a todo comment
* chore: update poetry.lock
* chore: specify python versions
* chore: moving langchain integration tests to sdk
* chore: format
* feat: added support for o3-mini and updated o1-mini prices. also updated integration tests to support o3 (#202)
* chore: removed duplicated code; removed duplicated integration tests
* chore: updated github actions to run integration tests
* chore: fixing github actions
* chore: fixing github actions again
* chore: fixing github actions again-x2
* chore: fixing github actions again-x2
* chore: added cache of dependencies to integration-tests in githubaction
* chore: updated integration-tests action to inject github secrets into env
* Feat/bedrock support for Nova models through the ConverseAPI (#207)
* feat: added support for bedrock nova models
* feat: tokens are now read from usage if available to ensure accuracy
* chore: removed duplicated integration tests folder in wrong place
* feat: refactored bedrock provider into being a single file instead of folder
* chore: renamed bedrock to bedrock-converse in examples/core.py
* chore: renamed bedrock in config.yaml
* [fix] bump prerelease version in pyproject.toml
* [fix] bump prerelease version in pyproject.toml
* [fix] bump prerelease version in pyproject.toml
* Update pyproject.toml
updated llmstudio-tracker version
Signed-off-by: Miguel Neves <61327611+MiNeves00@users.noreply.github.com>
* [fix] bump prerelease version in pyproject.toml
* chore: updated llmstudio sdk poetry.lock
* Feat/converse support images (#211)
* feat: added converse-api support for images in input. started making an integration test for this.
* chore: added integration test for converse image sending
* chore: send images integration test now also tests for openai
* chore: integration test of send_imgs added async testing
* chore: updated examples core.py to also have send images
* feat: bedrock image input is now same contract as openai
* chore: ChatCompletionLLMstudio print now hides large image bytes for readability
* chore: fixes in the pretty print of ChatCompletionLLMstudio
* chore: small fix in examples/core.py
* fix: test_send_imgs had bug on reading env
* chore: made clean_print optional on chatcompletions; image from url is directly converted to bytes
* [fix] bump prerelease version in pyproject.toml
* [fix] bump prerelease version in pyproject.toml
* [fix] bump prerelease version in pyproject.toml
* Update pyproject.toml
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
* Update pyproject.toml
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
* chore: format
---------
Signed-off-by: Diogo Goncalves <diogoncalves@users.noreply.github.com>
Signed-off-by: Miguel Neves <61327611+MiNeves00@users.noreply.github.com>
Co-authored-by: Miguel Neves <61327611+MiNeves00@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: brunoalho99 <132477278+brunoalho99@users.noreply.github.com>
Co-authored-by: brunoalho <bruno.alho@tensorops.ai>
Co-authored-by: Miguel Neves <miguel.neves.filipe@gmail.com>1 parent cd453f8 commit 851e5b6
File tree
9 files changed
+2220
-1517
lines changed- examples
- libs
- core
- llmstudio_core/providers
- llmstudio
- tests/integration_tests
- test_data
9 files changed
+2220
-1517
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | | - | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
| 39 | + | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
| 83 | + | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
| |||
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
140 | | - | |
141 | | - | |
142 | 138 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
147 | 158 | | |
148 | 159 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 160 | + | |
154 | 161 | | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | | - | |
157 | 165 | | |
158 | | - | |
159 | | - | |
| 166 | + | |
160 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
161 | 171 | | |
162 | | - | |
| 172 | + | |
163 | 173 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
279 | 310 | | |
280 | 311 | | |
281 | 312 | | |
| |||
303 | 334 | | |
304 | 335 | | |
305 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
306 | 393 | | |
307 | 394 | | |
308 | 395 | | |
| |||
0 commit comments