BoxcarsAI / boxcars

Building applications with composability using Boxcars with LLM's. Inspired by LangChain.
MIT License
430 stars 39 forks source link

Getting the same verbosity as in the examples #54

Closed LemuelCushing closed 1 year ago

LemuelCushing commented 1 year ago

Not sure if I'm missing something super obvious, but I'm unable to figure out how to achive the same lever of verbosity as in the example notebooks (or the readme). When I run, for intance:

boxcar = Boxcars::ActiveRecord.new(name: "Menagerie", models: [Flapdoodle, Chinwag])
res = boxcar.run "How many squirming Flapdoodles have had a good chinwag in the last 10 days?"
res.class

I get Integer, where I would like to see the full hash with the code.

How would I go about achieving that?

francis commented 1 year ago

Hi @LemuelCushing

So the boxcar.run method always returns a string. However, if you want more details, you can call boxcar.conduct instead.

There are a few things you can do to bump up the logging verbosity too. By default, boxcars picks up the Rails logger and logging level. You can change the logger to your own with debug level or set it to nil to print to stdout Boxcars.configuration.logger = ...

You can also set an environment variable to log the live prompting output: LOG_PROMPTS=true

Hope this help. Let me know if you have further questions... Francis