Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ProcessMaker/Ai/Handlers/LanguageTranslationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public function setProcessId($processId)
$this->processId = $processId;
}

public function getPromptsPath()
{
return app_path() . '/Ai/Prompts/';
}

public function getPromptFile($type = null)
{
return file_get_contents($this->getPromptsPath() . 'language_translation_' . $type . '.md');
Expand Down
87 changes: 0 additions & 87 deletions ProcessMaker/Ai/Handlers/NlqToCategoryHandler.php

This file was deleted.

83 changes: 0 additions & 83 deletions ProcessMaker/Ai/Handlers/NlqToPmqlHandler.php

This file was deleted.

18 changes: 4 additions & 14 deletions ProcessMaker/Ai/Handlers/OpenAiHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public function __construct()
{
}

public function getPromptsPath()
public function getConfig()
{
return app_path() . '/Ai/Prompts/';
return $this->config;
}

public function getConfig()
public function getQuestion()
{
return $this->config;
return $this->question;
}

public function setModel(String $model)
Expand Down Expand Up @@ -65,16 +65,6 @@ public function setPresencePenalty(float $presencePenalty)
$this->config['presence_penalty'] = $presencePenalty;
}

public function saveResponse(string $type, string $response)
{
$aiSearch = new AiSearch();
$aiSearch->type = $type;
$aiSearch->search = $this->question;
$aiSearch->response = $response;
$aiSearch->user_id = \Auth::user()->id;
$aiSearch->save();
}

abstract public function getPromptFile($type = null);

abstract public function generatePrompt(String $type = null, String $description);
Expand Down
16 changes: 0 additions & 16 deletions ProcessMaker/Ai/Prompts/nlq_to_category.md

This file was deleted.

91 changes: 0 additions & 91 deletions ProcessMaker/Ai/Prompts/nlq_to_pmql_collections.md

This file was deleted.

Loading