Skip to content
Snippets Groups Projects
Commit 100bc55c authored by Marcus Johansson's avatar Marcus Johansson Committed by Marcus Johansson
Browse files

Issue #3421057 by Marcus_Johansson: Add Dall-E 3

parent ac273913
No related branches found
No related tags found
No related merge requests found
Pipeline #93638 passed with warnings
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
# "ref" value can be:
# - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib.
# - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates.
# - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features).
# - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates.
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
# - '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
# variables:
# SKIP_ESLINT: '1'
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################
......@@ -2,7 +2,6 @@
namespace Drupal\ai_interpolator_promptperfect\Plugin\AiInterPolatorFieldRules;
use Drupal\ai_interpolator\Annotation\AiInterpolatorFieldRule;
use Drupal\ai_interpolator_promptperfect\PromptPerfectText;
/**
......
......@@ -2,7 +2,6 @@
namespace Drupal\ai_interpolator_promptperfect\Plugin\AiInterPolatorFieldRules;
use Drupal\ai_interpolator\Annotation\AiInterpolatorFieldRule;
use Drupal\ai_interpolator_promptperfect\PromptPerfectText;
/**
......
......@@ -4,7 +4,6 @@ namespace Drupal\ai_interpolator_promptperfect;
use Drupal\ai_interpolator\Annotation\AiInterpolatorFieldRule;
use Drupal\ai_interpolator\PluginInterfaces\AiInterpolatorFieldRuleInterface;
use Drupal\ai_interpolator_promptperfect\PromptPerfect;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
......@@ -16,6 +15,9 @@ use Drupal\Core\Utility\Token;
use Drupal\file\FileRepositoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* PromptPerfect Text field.
*/
class PromptPerfectText extends AiInterpolatorFieldRule implements AiInterpolatorFieldRuleInterface, ContainerFactoryPluginInterface {
/**
......@@ -147,29 +149,30 @@ class PromptPerfectText extends AiInterpolatorFieldRule implements AiInterpolato
'#title' => 'Target Model',
'#required' => TRUE,
'#options' => [
'chatgpt' => 'Chat GPT',
'gpt4' => 'GPT-4',
'stablelm-tuned-alpha-7b' => 'StabelLM Tuned Alpha 7b',
'claude' => 'Claude',
'claude-2' => 'Claude 2',
'ernie-bot-turbo' => 'Ernie Bot Turbo',
'llama-2-70b-chat' => 'Llama 2 70b chat',
'llama-2-13b-chat' => 'Llama 2 13b chat',
'llama-2-7b-chat' => 'Llama 2 7b chat',
'cogenerate' => 'CoGenerate',
'jinachat' => 'JinaChat',
'text-davinci-003' => 'GPT-3 (Text Davinci 003)',
'dalle' => 'Dall-E',
'sdxl' => 'Stable Diffusion XL',
'midjourney' => 'Midjourney',
'sd' => 'Stable Diffusion',
'kadinsky' => 'Kadinsky',
'dreamshaper' => 'DreamShaper',
'absolutereality' => 'Absolute Reality',
'anything' => 'Anything AI',
'deliberate' => 'deliberate.ai',
'sdxl-emoji' => 'Stable Diffusion XL Emoji',
'lexica' => 'Lexica',
'chatgpt' => $this->t('Chat GPT'),
'gpt4' => $this->t('GPT-4'),
'stablelm-tuned-alpha-7b' => $this->t('StabelLM Tuned Alpha 7b'),
'claude' => $this->t('Claude'),
'claude-2' => $this->t('Claude 2'),
'ernie-bot-turbo' => $this->t('Ernie Bot Turbo'),
'llama-2-70b-chat' => $this->t('Llama 2 70b chat'),
'llama-2-13b-chat' => $this->t('Llama 2 13b chat'),
'llama-2-7b-chat' => $this->t('Llama 2 7b chat'),
'cogenerate' => $this->t('CoGenerate'),
'jinachat' => $this->t('JinaChat'),
'text-davinci-003' => $this->t('GPT-3 (Text Davinci 003)'),
'dalle-3' => $this->t('Dall-E 3'),
'dalle' => $this->t('Dall-E'),
'sdxl' => $this->t('Stable Diffusion XL'),
'midjourney' => $this->t('Midjourney'),
'sd' => $this->t('Stable Diffusion'),
'kadinsky' => $this->t('Kadinsky'),
'dreamshaper' => $this->t('DreamShaper'),
'absolutereality' => $this->t('Absolute Reality'),
'anything' => $this->t('Anything AI'),
'deliberate' => $this->t('deliberate.ai'),
'sdxl-emoji' => $this->t('Stable Diffusion XL Emoji'),
'lexica' => $this->t('Lexica'),
],
'#description' => $this->t('The target model to use.'),
'#default_value' => $fieldDefinition->getConfig($entity->bundle())->getThirdPartySetting('ai_interpolator', 'interpolator_promptperfect_target_model', 'chatgpt'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment