-
Notifications
You must be signed in to change notification settings - Fork 0
Implement AI Module (In-progress) #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
ca8aec5
0adb5bc
75a67d3
9b44ec4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:latest | ||
| container_name: summarizz_postgres | ||
| restart: unless-stopped | ||
| environment: | ||
| POSTGRES_USER: summarizz | ||
| POSTGRES_PASSWORD: summarizz | ||
| POSTGRES_DB: summarizz | ||
| POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C" | ||
| ports: | ||
| - "5433:5433" | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
|
|
||
| volumes: | ||
| postgres_data: | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||
| export CONFIG_SCRIPT := "./scripts/config.sh" | ||||||
|
|
||||||
| alias s := setup | ||||||
| alias b := build | ||||||
| alias c := clean | ||||||
| alias t := test | ||||||
| alias rd := run-dev | ||||||
| alias rp := run-prod | ||||||
|
|
||||||
| default: | ||||||
| just --list | ||||||
|
|
||||||
| # NOTE: Cleans build artifacts and deletes node_modules | ||||||
| clean: | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Cleaning build artifacts and node_modules..." | ||||||
| items=("node_modules" "dist" "coverage" ".eslintcache" ".cache" ".nyc_output" "package-lock.json" "yarn.lock" "pnpm-lock.yaml") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider preserving package lock files. Removing package lock files ( Consider removing lock files from the clean list or creating a separate recipe for deep cleaning: - items=("node_modules" "dist" "coverage" ".eslintcache" ".cache" ".nyc_output" "package-lock.json" "yarn.lock" "pnpm-lock.yaml")
+ items=("node_modules" "dist" "coverage" ".eslintcache" ".cache" ".nyc_output")Alternatively, add a 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| for item in "${items[@]}"; do | ||||||
| if [[ "$item" == *.* ]]; then | ||||||
| find . -name "$item" -type f -exec rm -f "{}" + 2>/dev/null || true | ||||||
| else | ||||||
| find . -name "$item" -type d -prune -exec rm -rf "{}" + 2>/dev/null || true | ||||||
| fi | ||||||
| done | ||||||
|
|
||||||
|
|
||||||
| # NOTE: Best to run this before any other recipe to ensure a clean start | ||||||
| setup: clean | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Setting up backend application with provided configuration..." | ||||||
| npm install | ||||||
|
|
||||||
| # NOTE: Builds the entire backend application for dev/prod runs | ||||||
| build: | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Building backend application with provided configuration..." | ||||||
| npm run build | ||||||
|
|
||||||
| # NOTE: Runs the linter (eslint) to check for standards and code quality | ||||||
| lint: | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Running linter with provided configuration..." | ||||||
| npm run lint | ||||||
|
|
||||||
| # NOTE: Runs tests using jest (optionally set --verbose flag) | ||||||
| test arg="default": | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Running backend tests with provided argument: $arg..." | ||||||
| if [ -z "$arg" ]; then \ | ||||||
| arg="default" \ | ||||||
| fi | ||||||
|
|
||||||
| if [ "$arg" == "v" ] || [ "$arg" == "-v" ] || [ "$arg" == "--v" ] || [ "$arg" == "verbose" ]; then \ | ||||||
| npm run test:verbose \ | ||||||
| else \ | ||||||
| npm run test \ | ||||||
| fi | ||||||
|
|
||||||
| # NOTE: Runs all tasks in a sequence to setup respective backend environment | ||||||
| start arg="default": clean build lint (test arg) | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Starting backend application with provided configuration..." | ||||||
| npm run start | ||||||
|
|
||||||
| # NOTE: Runs the respective backend environment in development mode (nodemon for hot reloading) | ||||||
| run-dev: clean build lint | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Running backend application in development mode..." | ||||||
| npm run dev | ||||||
|
|
||||||
| # NOTE: Runs the respective backend environment in production mode (without nodemon, should only be used when deploying) | ||||||
| run-prod arg="default": clean build lint (test arg) | ||||||
| #!/usr/bin/env bash | ||||||
| source $CONFIG_SCRIPT | ||||||
|
|
||||||
| info "Running backend application in production mode..." | ||||||
| npm run start | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| if command -v tput >/dev/null 2>&1; then | ||
| COLOR_RESET=$(tput sgr0) | ||
| COLOR_RED=$(tput setaf 1) | ||
| COLOR_GREEN=$(tput setaf 2) | ||
| COLOR_YELLOW=$(tput setaf 3) | ||
| COLOR_BLUE=$(tput setaf 4) | ||
| COLOR_MAGENTA=$(tput setaf 5) | ||
| COLOR_CYAN=$(tput setaf 6) | ||
| COLOR_WHITE=$(tput setaf 7) | ||
| else | ||
| COLOR_RESET="\033[0m" | ||
| COLOR_RED="\033[0;31m" | ||
| COLOR_GREEN="\033[0;32m" | ||
| COLOR_YELLOW="\033[0;33m" | ||
| COLOR_BLUE="\033[0;34m" | ||
| COLOR_MAGENTA="\033[0;35m" | ||
| COLOR_CYAN="\033[0;36m" | ||
| COLOR_WHITE="\033[0;37m" | ||
| fi | ||
|
|
||
| PREFIX_INFO="${COLOR_BLUE}[INFO]${COLOR_RESET}" | ||
| PREFIX_WARN="${COLOR_YELLOW}[WARN]${COLOR_RESET}" | ||
| PREFIX_ERROR="${COLOR_RED}[ERROR]${COLOR_RESET}" | ||
| PREFIX_SUCCESS="${COLOR_GREEN}[SUCCESS]${COLOR_RESET}" | ||
| PREFIX_DEBUG="${COLOR_MAGENTA}[DEBUG]${COLOR_RESET}" | ||
|
|
||
| _get_current_timestamp() { | ||
| date "+%Y-%m-%d %H:%M:%S" | ||
| } | ||
|
|
||
| info() { | ||
| echo "${PREFIX_INFO} [$(_get_current_timestamp)] ${1}" | ||
| } | ||
|
|
||
| warn() { | ||
| echo "${PREFIX_WARN} [$(_get_current_timestamp)] ${COLOR_YELLOW}${1}${COLOR_RESET}" >&2 | ||
| } | ||
|
|
||
| error() { | ||
| echo "${PREFIX_ERROR} [$(_get_current_timestamp)] ${COLOR_RED}${1}${COLOR_RESET}" >&2 | ||
| } | ||
|
|
||
| success() { | ||
| echo "${PREFIX_SUCCESS} [$(_get_current_timestamp)] ${COLOR_GREEN}${1}${COLOR_RESET}" | ||
| } | ||
|
|
||
| debug() { | ||
| echo "${PREFIX_DEBUG} [$(_get_current_timestamp)] ${COLOR_MAGENTA}${1}${COLOR_RESET}" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/bin/bash | ||
| #!/usr/bin/env bash | ||
|
|
||
| echo "Setting up test PostgreSQL database for Summarizz..." | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,18 +1,107 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { AIModel, ModelConfig } from '../types'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { AIGenerationModel, AIModel, GenerationModelConfig, ModelConfig } from '../types'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { HarmBlockMethod, HarmBlockThreshold, HarmCategory } from '@google/genai'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { SUMMARY_SYSTEM_PROMPT } from './prompts'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MODEL_CONFIGS: Record<AIModel, ModelConfig> = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const MAX_OUTPUT_TOKENS = 1500; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SUMMARIZATION_MODEL_CONFIGS: Record<AIModel, ModelConfig> = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIModel.Gemini20Flash]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| safetySettings: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+9
to
+30
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix duplicate safety settings for hate speech. Each model configuration contains three identical safety settings for Consider using different harm categories like: {
method: HarmBlockMethod.SEVERITY,
category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
},
{
method: HarmBlockMethod.SEVERITY,
- category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
+ category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
},
{
method: HarmBlockMethod.SEVERITY,
- category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
+ category: HarmCategory.HARM_CATEGORY_HARASSMENT,
threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
},Also applies to: 37-58, 65-86 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| systemInstruction: SUMMARY_SYSTEM_PROMPT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| temperature: 0.2, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxOutputTokens: 1500, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxOutputTokens: MAX_OUTPUT_TOKENS, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| topP: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| frequencyPenalty: 0.1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| presencePenalty: 0.1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIModel.Gemini15Flash]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| safetySettings: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| systemInstruction: SUMMARY_SYSTEM_PROMPT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| temperature: 0.2, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxOutputTokens: MAX_OUTPUT_TOKENS, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| topP: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIModel.Gemini15FlashLite]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| safetySettings: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| method: HarmBlockMethod.SEVERITY, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| systemInstruction: SUMMARY_SYSTEM_PROMPT, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| temperature: 0.2, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxOutputTokens: 1500, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxOutputTokens: MAX_OUTPUT_TOKENS, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| topP: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| frequencyPenalty: 0.1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| presencePenalty: 0.1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const IMAGE_GENERATION_MODEL_CONFIGS: Record<AIGenerationModel, GenerationModelConfig> = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIGenerationModel.Gemini20FlashImageGenPreview]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIGenerationModel.TogetherFlux1SchnellFree]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIGenerationModel.TogetherFlux1Schnell]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [AIGenerationModel.TogetherFlux1Dev]: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+94
to
107
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add model configurations for image generation. All image generation model configurations are empty. Based on the Example configuration: [AIGenerationModel.Gemini20FlashImageGenPreview]: {
-
+ width: 1024,
+ height: 1024,
+ steps: 50,
+ responseFormat: 'url',
+ disableSafetyChecker: false
},Would you like me to help generate appropriate configurations for each model based on their capabilities? 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix PostgreSQL port mapping
The container’s default Postgres port is 5432, so mapping
"5433:5433"won’t expose the database. Change to map host port 5433 to container port 5432:🤖 Prompt for AI Agents