PluginProbe
AI Engine – The Chatbot, AI Framework & MCP for WordPress / 1.3.75
AI Engine – The Chatbot, AI Framework & MCP for WordPress v1.3.75
3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.7.2 3.7.1 3.7.0 3.6.9 3.6.8 3.6.7 3.6.6 3.6.4 3.6.5 3.6.3 3.6.2 3.6.1 3.6.0 3.5.9 3.5.8 3.5.7 3.5.6 3.5.5 3.5.4 3.5.3 All 527 releases
ai-engine / classes / queryimage.php

queryimage.php in AI Engine – The Chatbot, AI Framework & MCP for WordPress 1.3.75, at classes/queryimage.php

31 lines 803 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Meow_MWAI_QueryImage extends Meow_MWAI_Query {
4
5 public function __construct( $prompt = "", $model = "dall-e" ) {
6 parent::__construct( $prompt );
7 $this->model = $model;
8 $this->mode = "generation"; // could be generation, edit, variation
9 }
10
11 // Based on the params of the query, update the attributes
12 public function injectParams( $params ) {
13 if ( isset( $params['model'] ) ) {
14 $this->setModel( $params['model'] );
15 }
16 if ( isset( $params['apiKey'] ) ) {
17 $this->setApiKey( $params['apiKey'] );
18 }
19 if ( isset( $params['maxResults'] ) ) {
20 $this->setMaxResults( $params['maxResults'] );
21 }
22 if ( isset( $params['env'] ) ) {
23 $this->setEnv( $params['env'] );
24 }
25 if ( isset( $params['session'] ) ) {
26 $this->setSession( $params['session'] );
27 }
28 }
29
30 }
31