thmsmlr / instructor_ex

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

feat: support json mode #16

Closed TwistingTwists closed 7 months ago

TwistingTwists commented 7 months ago
TwistingTwists commented 7 months ago

Mix.install(
  [

    {:instructor, path: "your local code path /instructor_ex"}
  ],
  config: [
    instructor: [
      adapter: Instructor.Adapters.Ollama
    ],
    openai: [
      api_key: System.fetch_env!("LB_OPENAI_API_KEY"),
      http_options: [recv_timeout: :infinity, async: :once]
    ]
  ]
)```

Use the `Ollama` adapter for now.
TwistingTwists commented 7 months ago

closing in favour of a well done PR on the same issue - https://github.com/thmsmlr/instructor_ex/pull/15