Skip to content

Commit

Permalink
cleanup and update npm pkgs
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Aug 19, 2024
1 parent fd02990 commit 6361403
Show file tree
Hide file tree
Showing 6 changed files with 767 additions and 722 deletions.
9 changes: 1 addition & 8 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@
class Application extends App implements IBootstrap {

public const APP_ID = 'assistant';
public const DEFAULT_ASSISTANT_TASK_IDLE_TIME = 60 * 60 * 24 * 14; // 14 days

public const MAX_STORED_IMAGE_PROMPTS_PER_USER = 5;
public const MAX_STORED_TEXT_PROMPTS_PER_USER = 5;
public const DEFAULT_MAX_IMAGE_GENERATION_IDLE_TIME = 60 * 60 * 24 * 90; // 90 days
public const DEFAULT_TEXT_GENERATION_STORAGE_TIME = 60 * 60 * 24 * 90; // 90 days
public const IMAGE_FOLDER = 'generated_images';
public const SPEECH_TO_TEXT_REC_FOLDER = 'stt_recordings';

public const ASSISTANT_DATA_FOLDER_NAME = 'Assistant';

public const CHAT_USER_INSTRUCTIONS = 'This is a conversation in a specific language between {user} and you, Nextcloud Assistant. You are a kind, polite and helpful AI that helps {user} to the best of its abilities. If you do not understand something, you will ask for clarification. Detect the language that {user} is using. Make sure to use the same language in your response. Do not mention the language explicitly.';
Expand Down
2 changes: 0 additions & 2 deletions lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function getForm(): TemplateResponse {

$freePromptPickerEnabled = $this->config->getAppValue(Application::APP_ID, 'free_prompt_picker_enabled', '1') === '1';
$textToImagePickerEnabled = $this->config->getAppValue(Application::APP_ID, 'text_to_image_picker_enabled', '1') === '1';
$maxImageGenerationIdleTime = (int) $this->config->getAppValue(Application::APP_ID, 'max_image_generation_idle_time', (string) Application::DEFAULT_MAX_IMAGE_GENERATION_IDLE_TIME);

$speechToTextEnabled = $this->config->getAppValue(Application::APP_ID, 'speech_to_text_picker_enabled', '1') === '1';
$chattyLLMUserInstructions = $this->config->getAppValue(Application::APP_ID, 'chat_user_instructions', Application::CHAT_USER_INSTRUCTIONS);
Expand All @@ -49,7 +48,6 @@ public function getForm(): TemplateResponse {
'assistant_enabled' => $assistantEnabled,
'text_to_image_picker_available' => $textToImageAvailable,
'text_to_image_picker_enabled' => $textToImagePickerEnabled,
'max_image_generation_idle_time' => $maxImageGenerationIdleTime,
'free_prompt_task_type_available' => $freePromptTaskTypeAvailable,
'free_prompt_picker_enabled' => $freePromptPickerEnabled,
'speech_to_text_picker_available' => $speechToTextAvailable,
Expand Down
Loading

0 comments on commit 6361403

Please sign in to comment.