EN | 中文

SmartPrompt

SmartPrompt is a powerful Ruby gem that provides a domain-specific language (DSL), enabling other Ruby programs to conveniently and naturally call upon the capabilities of various large language models (LLMs).

Key Features

  • Flexible task composition: Combine various tasks using specific service providers + specific LLMs + specific prompts
  • Nested subtasks: Support for composing and calling other subtasks in DSL form
  • Performance optimization: Provide performance-optimal or cost-effective solutions while ensuring quality

Installation

To install the gem and add it to your application's Gemfile, execute the following command:

$ bundle add smart_prompt

If you don't use a bundler to manage dependencies, you can install the gem by executing the following command:

$ gem install smart_prompt

Usage

See project SmartPromptDemo for more examples.