tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
4.84k stars 632 forks source link

ChainCallOption does not have JSON mode #1066

Open Anil8753 opened 1 week ago

Anil8753 commented 1 week ago

I am using googleai. I see following is available

opts:= []llms.CallOption{
    llms.WithJSONMode(),
}

But missing in chain

opts := []chains.ChainCallOption{
   chains.WithJSONMode(), // not present
}

chains.Run(
        ctx,
        llmChain,
        query,
        opts...,
    )

How to setup JSON mode with chains. I am trying to use chains.Run call.