Sign up to save tools and stay up to date with the latest in AI
bg
bg
1

GitHub - bananaml/fructose

Mar 06, 2024 - github.com
Fructose is a Python package that allows users to create a reliable, strongly-typed interface around an LLM call. By using the `@ai()` decorator on a type-annotated function, users can call it as they would a regular function. The package supports args, kwargs, return types, primitive types, compound types, complex datatypes, nested types, custom prompt templates, and local function calling. It currently executes the prompt with OpenAI, requiring users to use their own OpenAI API Key.

The package also offers features such as complex datatypes, local function calling, and configuration options at the decorator and function levels. Users can select their OpenAI model with the `model` keyword and modify the prompt using Flavors and Templates features. Fructose is currently in version 0, meaning the API is unstable version-to-version. It has potential use cases in game development scenarios, as demonstrated in a prototype of an alien creature merging/breeding game.

Key takeaways:

  • Fructose is a Python package that allows for the creation of a dependable, strongly-typed interface around an LLM call.
  • It supports args, kwargs, return types, primitive types, compound types, complex data types, nested types, custom prompt templates, and local function calling.
  • Fructose executes the prompt with OpenAI and requires the user's own OpenAI API Key for installation.
  • The package is currently in v0, meaning the API is unstable version-to-version and users are advised to pin their versions to ensure new builds don't break.
View Full Article

Comments (0)

Be the first to comment!