Riccardo Carlesso

Results 52 comments of Riccardo Carlesso

note this addresses https://github.com/GoogleCloudPlatform/ruby-docs-samples/issues/1476

Code: https://github.com/palladius/ricc-reads-the-news published on: https://ricc-reads-the-news.netlify.app/ am i doing something wrong? Is it a _config issue?

![image](https://github.com/user-attachments/assets/3b2fc0dc-739d-4198-b7e0-e0f5c60a3f11)

First error - hopefully fixed by updating numpy (maybe exacerbated?) ![image](https://github.com/user-attachments/assets/e07860df-f55a-49b2-9a82-e42d44e69f62)

Oh sorry, silly me, it's already patched :) https://github.com/patterns-ai-core/langchainrb/blob/main/lib/langchain/llm/google_vertex_ai.rb#L92 Andrei told me that that line was needed for some reason, so it's still good to have this bug open. Is...

(of course this can be generalized to OpenAI et al, I just battle tested it for Gemini and I know it works for it.)

Better demo: ```ruby $ ruby 06-llm-news-test.rb I, [2024-09-03T14:56:42.792026 #3162375] INFO -- : [Langchain.rb] [Langchain::Assistant]: Sending a call to Langchain::LLM::GoogleGemini I, [2024-09-03T14:56:44.696304 #3162375] INFO -- : [Langchain.rb] [Langchain::Tool::NewsRetriever]: Retrieving top news...

![image](https://github.com/user-attachments/assets/7dc211d2-baa6-40a4-a9c6-e06b2ee06b40) Shows the colorfulness.

Andrei if you like the idea I can change gem (from colorize to rainbow) and send a fix. You tell me

Let me rephrase it. Would you like it if I add a generic `pretty_print()` for a GoogleMessage or better any LLM BaseMessage in a PR? If you find it silly...