News for hackers. Stuff that matters.
Re:All I Want for Xmas Is Your Secrets: LangGrinch Hits Lang... by int_19h on Saturday December 27, 2025 @04:29AM (#46400468)
For what LangChain does, yes, handrolled code. There won't be much of it because it doesn't actually do all that much.

As for "import openai", that's actually somewhat orthogonal, but if what you want is a common API for different providers then there are many options around that do just that. But then again at that point you probably also want something like OpenRouter, which has its own generic API.

Re:All I Want for Xmas Is Your Secrets: LangGrinch Hits Lang... by jmogly on Sunday December 28, 2025 @04:49AM (#46409829)
I’ve been using the following pattern since gpt3, the only other thing I have changed was added another parameter for schema for structured output. People really love to overcomplicate things.

class AI(Protocol):

def call_llm(prompt: str) -> str: …