contai

0

Описание

Коннектор с AI генераторами для Rails моделей. Подключает внешние API с генераторами для создания контента в различных полях моделей.

http://capaa.ru

Языки

  • Ruby76,2%
  • JavaScript19%
  • CSS4,3%
  • Shell0,5%
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
10 месяцев назад
README.md

Contai

AI content generation for Rails models. Integrate external AI APIs seamlessly into your Rails applications.

Installation

Add this line to your application's Gemfile:

And then execute:

$ bundle install

Usage

Basic Setup

Include

Contai::Generatable
in your model and configure it:

Generate Content

Supported Providers

OpenAI

Claude

N8N Webhook

Custom HTTP

Configuration

Configure global defaults:

HTTP Headers Configuration

You can configure HTTP headers in three ways:

  1. Global default headers in the initializer (applies to all HTTP-based providers):
  1. Provider-specific headers in your model:
  1. Combining both - provider headers will be merged with default headers:

Routes

Add to your routes file:

Error Handling

The gem provides comprehensive error handling:

Testing

Test your models with Contai:

Development

After checking out the repo, run:

Contributing

  1. Fork it
  2. Create your feature branch (
    git checkout -b my-new-feature
    )
  3. Commit your changes (
    git commit -am 'Add some feature'
    )
  4. Push to the branch (
    git push origin my-new-feature
    )
  5. Create new Pull Request

License

The gem is available as open source under the terms of the CAPAA License.