-
-
Notifications
You must be signed in to change notification settings - Fork 102
Description
I'm struggling a bit with some refactoring we've done in the examples - explicitly around dealing with the result of the Platform.
I'd argue the purpose of examples is to provide working code snippets for various platforms & features. ready for copy & paste - and understanding what's going on.
in the beginning I introduced bootstrap for getting rid of secondary things - basically boring stuff that wasn't around Symfony AI. retrieving env vars with error message, a logger and instantiating an http client with a logger.
with functions like print_token_usage
we now hide how to actually access and use the token data, and devs would need to switch from the example to the bootstrap.php
other functions in question: print_vectors
, perplexity_print_*
and print_stream
i get that there's a lot of duplicated code, but i think that's the nature of it. and I'd argue it's kinda stupid code, that is easy to maintain.
WDYT?