thmsmlr / instructor_ex

Structured outputs for LLMs in Elixir
https://hexdocs.pm/instructor
430 stars 48 forks source link

Code not being executed during tests #49

Open petrus-jvrensburg opened 2 months ago

petrus-jvrensburg commented 2 months ago

Currently, it looks like calls to Instructor.Adapter are being mocked here: https://github.com/thmsmlr/instructor_ex/blob/75f1a235f3f36aa9b679aea775ff8cd027872dfa/test/test_helper.exs#L1

That means that Instructor.Adapter itself, and the modules being called from it, are not actually executed during tests.

E.g. If I add an error like tmp = 1/0 to Instructor.Adapters.OpenAI.do_chat_completion and run the tests locally, they pass.