mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-06 20:13:35 +09:00
This PR introduces the baseline `@webstudio-is/ai` package which includes: 1. A LLM Abstraction (types) for messages format to make requests to a model 2. An implementation of the above that uses the OpenAI chat completion endpoint 3. A common interface for chains. Chains are regular async functions that can execute an arbitrary number of steps, including calling a LLM via a model client. The idea is that a builder API route can use any of these chains to perform a task that requires AI. For example generate text copy, images, a theme etc.