Introducing TypeChat from Microsoft

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • TypeChat

    TypeChat is a library that makes it easy to build natural language interfaces using types.

  • The value is in:

    1. Running the typescript type checker against what is returned by the LLM.

    2. If there are type errors, combining those into a "repair prompt" that will (it is assumed) have a higher likelihood of eliciting an LLM output that type checks.

    3. Handling the cases where the heuristic in #2 fails gracefully.

    https://github.com/microsoft/TypeChat/blob/main/src/typechat...

    In my experience experimenting with the same basic idea, the heuristic in #2 works surprisingly well for relatively simple types (i.e. records and arrays not nested too deeply, limited use of type variables). It turns out that relatively prompting LLMs to return values inhabiting simple types can be used to create useful applications. Since that is valuable, this library is valuable inasmuch as it eliminates the need to hand roll this request pattern, and provides a standardized integration with the typescript codebase.

  • guidance

    Discontinued A guidance language for controlling large language models. [Moved to: https://github.com/guidance-ai/guidance] (by microsoft)

  • Here's one thing I don't get.

    Why all the rigamarole of hoping you get a valid response, adding last-mile validators to detect invalid responses, trying to beg the model to pretty please give me the syntax I'm asking for...

    ...when you can guarantee a valid JSON syntax by only sampling tokens that are valid? Instead of greedily picking the highest-scoring token every time, you select the highest-scoring token that conforms to the requested format.

    This is what Guidance does already, also from Microsoft: https://github.com/microsoft/guidance

    But OpenAI apparently does not expose the full scores of all tokens, it only exposes the highest-scoring token. Which is so odd, because if you run models locally, using Guidance is trivial, and you can guarantee your json is correct every time. It's faster to generate, too!

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • ts-patch

    Augment the TypeScript compiler to support extended functionality

  • yup, just found that, super neat, I am 100% interested in using this for other runtime validation...

    It's interesting because I've always been under the impression the TS team was against the use of types at runtime (that's why projects like https://github.com/nonara/ts-patch) exist, but now they're doing it themselves with this project...

  • ai-agents-laravel

    Build AI Agents for popular LLMs quick and easy in Laravel

  • I built and released something really similar to this (but smaller scope) for Laravel PHP this week: https://github.com/adrenallen/ai-agents-laravel

    My take on this is, it should be easy for an engineer to spin up a new "bot" with a given LLM. There's a lot of boring work around translating your functions into something ChatGPT understands, then dealing with the response and parsing it back again.

    With systems like these you can just focus on writing the actual PHP code, adding a few clear comments, and then the bot can immediately use your code like a tool in whatever task you give it.

    Another benefit to things like this, is that it makes it much easier for code to be shared. If someone writes a function, you could pull it into a new bot and immediately use it. It eliminates the layer of "converting this for the LLM to use and understand", which I think is pretty cool and makes building so much quicker!

    None of this is perfect yet, but I think this is the direction everything will go so that we can start to leverage each others code better. Think about how we use package managers in coding today, I want a package manager for AI specific tooling. Just install the "get the weather" library, add it to my bot, and now it can get the weather.

  • LLM-OpenAPI-minifier

    Making openapi spec swagger documents friendly for GPT and other LLMs.

  • https://github.com/ShelbyJenkins/LLM-OpenAPI-minifier

    I have a working solution to exposing the toggles.

    I’m integrating it into the bot I have in the other repo.

    Goal is you point to an openapi spec and then GPT can run choose and run functions. Basically Siri but with access to any API.

  • shelby_as_a_service

    Production-ready LLM Agents. Just add API keys (by ShelbyJenkins)

  • It’s logit bias. You don’t even need another library to do this. You can do it with three lines of python.

    Here’s an example of one of my implementations of logit bias.

    https://github.com/ShelbyJenkins/shelby-as-a-service/blob/74...

  • zod-gpt

    Get structured, fully typed, and validated JSON outputs from OpenAI and Anthropic models.

  • Here's a project that does that better imo:

    https://github.com/dzhng/zod-gpt

    And by better I mean doesn't tie you to OpenAI for no good reason

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gollum

    Production grade LLM-ops in Golang (by stillmatic)

  • I've written a version of this in Golang: https://github.com/stillmatic/gollum/blob/main/dispatch.go

    ```go

  • CopilotKit

    Discontinued Build in-app AI chatbots 🤖, and AI-powered Textareas ✨, into react web apps. [Moved to: https://github.com/CopilotKit/CopilotKit] (by RecursivelyAI)

  • I just published CopilotKit, which lets you implement this exact functionality for any web app via react hooks.

    `useMakeCopilotActionable` = you pass the type of the input, and an arbitrary typescript function implementation.

    https://github.com/RecursivelyAI/CopilotKit

    Feedback welcome

  • hof

    Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.

  • here is one of our early examples: https://github.com/hofstadter-io/hof/blob/_dev/flow/chat/pro...

  • llama.cpp

    LLM inference in C/C++

  • Llama.cpp recently added grammar based sampling, which constraints token selection to follow a rigid format like you describe.

    https://github.com/ggerganov/llama.cpp/pull/1773

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts