hazo_llm_api 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
- package/techdoc.md +2 -2
- package/dist/components/hazo_llm_prompt_config/hazo_llm_prompt_config.d.ts +0 -16
- package/dist/components/hazo_llm_prompt_config/hazo_llm_prompt_config.d.ts.map +0 -1
- package/dist/components/hazo_llm_prompt_config/hazo_llm_prompt_config.js +0 -258
- package/dist/components/hazo_llm_prompt_config/hazo_llm_prompt_config.js.map +0 -1
- package/dist/components/hazo_llm_prompt_config/index.d.ts +0 -8
- package/dist/components/hazo_llm_prompt_config/index.d.ts.map +0 -1
- package/dist/components/hazo_llm_prompt_config/index.js +0 -7
- package/dist/components/hazo_llm_prompt_config/index.js.map +0 -1
- package/dist/components/hazo_llm_prompt_config/types.d.ts +0 -74
- package/dist/components/hazo_llm_prompt_config/types.d.ts.map +0 -1
- package/dist/components/hazo_llm_prompt_config/types.js +0 -8
- package/dist/components/hazo_llm_prompt_config/types.js.map +0 -1
- package/dist/components/index.d.ts +0 -7
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -7
- package/dist/components/index.js.map +0 -1
- package/dist/components/layout/index.d.ts +0 -7
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/layout/index.js +0 -7
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/layout.d.ts +0 -21
- package/dist/components/layout/layout.d.ts.map +0 -1
- package/dist/components/layout/layout.js +0 -18
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/lib/config/config_parser.d.ts +0 -131
- package/dist/lib/config/config_parser.d.ts.map +0 -1
- package/dist/lib/config/config_parser.js +0 -297
- package/dist/lib/config/config_parser.js.map +0 -1
- package/dist/lib/config/index.d.ts +0 -8
- package/dist/lib/config/index.d.ts.map +0 -1
- package/dist/lib/config/index.js +0 -22
- package/dist/lib/config/index.js.map +0 -1
- package/dist/lib/config/provider_loader.d.ts +0 -113
- package/dist/lib/config/provider_loader.d.ts.map +0 -1
- package/dist/lib/config/provider_loader.js +0 -169
- package/dist/lib/config/provider_loader.js.map +0 -1
- package/dist/lib/database/index.d.ts +0 -8
- package/dist/lib/database/index.d.ts.map +0 -1
- package/dist/lib/database/index.js +0 -10
- package/dist/lib/database/index.js.map +0 -1
- package/dist/lib/database/init_database.d.ts +0 -118
- package/dist/lib/database/init_database.d.ts.map +0 -1
- package/dist/lib/database/init_database.js +0 -524
- package/dist/lib/database/init_database.js.map +0 -1
- package/dist/lib/database/utils.d.ts +0 -50
- package/dist/lib/database/utils.d.ts.map +0 -1
- package/dist/lib/database/utils.js +0 -78
- package/dist/lib/database/utils.js.map +0 -1
- package/dist/lib/index.d.ts +0 -14
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -17
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_image.d.ts +0 -26
- package/dist/lib/llm_api/hazo_llm_image_image.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_image.js +0 -94
- package/dist/lib/llm_api/hazo_llm_image_image.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_image_text.d.ts +0 -26
- package/dist/lib/llm_api/hazo_llm_image_image_text.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_image_text.js +0 -222
- package/dist/lib/llm_api/hazo_llm_image_image_text.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_text.d.ts +0 -20
- package/dist/lib/llm_api/hazo_llm_image_text.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_image_text.js +0 -78
- package/dist/lib/llm_api/hazo_llm_image_text.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_image.d.ts +0 -20
- package/dist/lib/llm_api/hazo_llm_text_image.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_image.js +0 -69
- package/dist/lib/llm_api/hazo_llm_text_image.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_image_text.d.ts +0 -26
- package/dist/lib/llm_api/hazo_llm_text_image_text.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_image_text.js +0 -154
- package/dist/lib/llm_api/hazo_llm_text_image_text.js.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_text.d.ts +0 -20
- package/dist/lib/llm_api/hazo_llm_text_text.d.ts.map +0 -1
- package/dist/lib/llm_api/hazo_llm_text_text.js +0 -91
- package/dist/lib/llm_api/hazo_llm_text_text.js.map +0 -1
- package/dist/lib/llm_api/index.d.ts +0 -191
- package/dist/lib/llm_api/index.d.ts.map +0 -1
- package/dist/lib/llm_api/index.js +0 -1168
- package/dist/lib/llm_api/index.js.map +0 -1
- package/dist/lib/llm_api/provider_helper.d.ts +0 -163
- package/dist/lib/llm_api/provider_helper.d.ts.map +0 -1
- package/dist/lib/llm_api/provider_helper.js +0 -346
- package/dist/lib/llm_api/provider_helper.js.map +0 -1
- package/dist/lib/llm_api/types.d.ts +0 -525
- package/dist/lib/llm_api/types.d.ts.map +0 -1
- package/dist/lib/llm_api/types.js +0 -49
- package/dist/lib/llm_api/types.js.map +0 -1
- package/dist/lib/prompts/get_prompt.d.ts +0 -50
- package/dist/lib/prompts/get_prompt.d.ts.map +0 -1
- package/dist/lib/prompts/get_prompt.js +0 -232
- package/dist/lib/prompts/get_prompt.js.map +0 -1
- package/dist/lib/prompts/index.d.ts +0 -9
- package/dist/lib/prompts/index.d.ts.map +0 -1
- package/dist/lib/prompts/index.js +0 -9
- package/dist/lib/prompts/index.js.map +0 -1
- package/dist/lib/prompts/prompt_cache.d.ts +0 -151
- package/dist/lib/prompts/prompt_cache.d.ts.map +0 -1
- package/dist/lib/prompts/prompt_cache.js +0 -276
- package/dist/lib/prompts/prompt_cache.js.map +0 -1
- package/dist/lib/prompts/substitute_variables.d.ts +0 -38
- package/dist/lib/prompts/substitute_variables.d.ts.map +0 -1
- package/dist/lib/prompts/substitute_variables.js +0 -175
- package/dist/lib/prompts/substitute_variables.js.map +0 -1
- package/dist/lib/providers/gemini/gemini_client.d.ts +0 -25
- package/dist/lib/providers/gemini/gemini_client.d.ts.map +0 -1
- package/dist/lib/providers/gemini/gemini_client.js +0 -235
- package/dist/lib/providers/gemini/gemini_client.js.map +0 -1
- package/dist/lib/providers/gemini/gemini_provider.d.ts +0 -111
- package/dist/lib/providers/gemini/gemini_provider.d.ts.map +0 -1
- package/dist/lib/providers/gemini/gemini_provider.js +0 -431
- package/dist/lib/providers/gemini/gemini_provider.js.map +0 -1
- package/dist/lib/providers/gemini/index.d.ts +0 -8
- package/dist/lib/providers/gemini/index.d.ts.map +0 -1
- package/dist/lib/providers/gemini/index.js +0 -8
- package/dist/lib/providers/gemini/index.js.map +0 -1
- package/dist/lib/providers/index.d.ts +0 -8
- package/dist/lib/providers/index.d.ts.map +0 -1
- package/dist/lib/providers/index.js +0 -8
- package/dist/lib/providers/index.js.map +0 -1
- package/dist/lib/providers/qwen/index.d.ts +0 -8
- package/dist/lib/providers/qwen/index.d.ts.map +0 -1
- package/dist/lib/providers/qwen/index.js +0 -8
- package/dist/lib/providers/qwen/index.js.map +0 -1
- package/dist/lib/providers/qwen/qwen_client.d.ts +0 -154
- package/dist/lib/providers/qwen/qwen_client.d.ts.map +0 -1
- package/dist/lib/providers/qwen/qwen_client.js +0 -1002
- package/dist/lib/providers/qwen/qwen_client.js.map +0 -1
- package/dist/lib/providers/qwen/qwen_provider.d.ts +0 -139
- package/dist/lib/providers/qwen/qwen_provider.d.ts.map +0 -1
- package/dist/lib/providers/qwen/qwen_provider.js +0 -304
- package/dist/lib/providers/qwen/qwen_provider.js.map +0 -1
- package/dist/lib/providers/registry.d.ts +0 -66
- package/dist/lib/providers/registry.d.ts.map +0 -1
- package/dist/lib/providers/registry.js +0 -158
- package/dist/lib/providers/registry.js.map +0 -1
- package/dist/lib/providers/types.d.ts +0 -145
- package/dist/lib/providers/types.d.ts.map +0 -1
- package/dist/lib/providers/types.js +0 -37
- package/dist/lib/providers/types.js.map +0 -1
- package/dist/server.d.ts +0 -26
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -49
- package/dist/server.js.map +0 -1
package/dist/lib/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library Module Exports
|
|
3
|
-
*
|
|
4
|
-
* Export all library functions from this module
|
|
5
|
-
*/
|
|
6
|
-
export { initialize_llm_api, hazo_llm_text_text, hazo_llm_image_text, hazo_llm_text_image, hazo_llm_image_image, hazo_llm_text_image_text, hazo_llm_image_image_text, is_initialized, get_current_config, } from './llm_api/index.js';
|
|
7
|
-
export type { LLMApiConfig, LLMApiClient, LLMResponse, TextTextParams, ImageTextParams, TextImageParams, ImageImageParams, TextImageTextParams, ImageImageTextParams, ChainImage, Logger, PromptVariable, PromptVariables, Base64Data, PromptTextMode, PromptRecord, CallLLMParams, } from './llm_api/types.js';
|
|
8
|
-
export { initialize_database, get_database, close_database, insert_prompt, update_prompt, } from './database/index.js';
|
|
9
|
-
export { get_prompt_by_area_and_key, get_prompt_text, get_prompts_by_area, get_prompt_by_uuid, substitute_variables, parse_prompt_variables, validate_variables, } from './prompts/index.js';
|
|
10
|
-
export { call_gemini_api, get_gemini_api_url, GeminiProvider, type GeminiProviderConfig, QwenProvider, type QwenProviderConfig, call_qwen_api, get_qwen_api_url, type QwenGenerationConfig, } from './providers/index.js';
|
|
11
|
-
export type { LLMProvider, LLMProviderConfig, ServiceType, LLMCapabilities, } from './providers/types.js';
|
|
12
|
-
export { SERVICE_TYPES, } from './providers/types.js';
|
|
13
|
-
export { register_provider, set_enabled_llms, set_primary_llm, get_primary_llm, get_provider, get_registered_providers, is_llm_enabled, } from './providers/registry.js';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACd,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,KAAK,oBAAoB,EACzB,YAAY,EACZ,KAAK,kBAAkB,EACvB,aAAa,EACb,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,aAAa,GACd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,cAAc,GACf,MAAM,yBAAyB,CAAC"}
|
package/dist/lib/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library Module Exports
|
|
3
|
-
*
|
|
4
|
-
* Export all library functions from this module
|
|
5
|
-
*/
|
|
6
|
-
// LLM API exports
|
|
7
|
-
export { initialize_llm_api, hazo_llm_text_text, hazo_llm_image_text, hazo_llm_text_image, hazo_llm_image_image, hazo_llm_text_image_text, hazo_llm_image_image_text, is_initialized, get_current_config, } from './llm_api/index.js';
|
|
8
|
-
// Database exports
|
|
9
|
-
export { initialize_database, get_database, close_database, insert_prompt, update_prompt, } from './database/index.js';
|
|
10
|
-
// Prompts exports
|
|
11
|
-
export { get_prompt_by_area_and_key, get_prompt_text, get_prompts_by_area, get_prompt_by_uuid, substitute_variables, parse_prompt_variables, validate_variables, } from './prompts/index.js';
|
|
12
|
-
// Provider exports
|
|
13
|
-
export { call_gemini_api, get_gemini_api_url, GeminiProvider, QwenProvider, call_qwen_api, get_qwen_api_url, } from './providers/index.js';
|
|
14
|
-
export { SERVICE_TYPES, } from './providers/types.js';
|
|
15
|
-
// Provider registry exports
|
|
16
|
-
export { register_provider, set_enabled_llms, set_primary_llm, get_primary_llm, get_provider, get_registered_providers, is_llm_enabled, } from './providers/registry.js';
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kBAAkB;AAClB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACd,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAuB5B,mBAAmB;AACnB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,kBAAkB;AAClB,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,mBAAmB;AACnB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EAEd,YAAY,EAEZ,aAAa,EACb,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,EACL,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,4BAA4B;AAC5B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,cAAc,GACf,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_image_image Function
|
|
3
|
-
*
|
|
4
|
-
* Image(s) input → Image output
|
|
5
|
-
* Transform/edit/combine images based on text instructions.
|
|
6
|
-
* Supports single or multiple input images.
|
|
7
|
-
* Uses image generation capable models with input image(s).
|
|
8
|
-
*/
|
|
9
|
-
import type { Database as SqlJsDatabase } from 'sql.js';
|
|
10
|
-
import type { ImageImageParams, LLMResponse, LLMApiConfig } from './types.js';
|
|
11
|
-
/**
|
|
12
|
-
* Call the LLM with image(s) input and get image output
|
|
13
|
-
* Used for image editing, transformation, style transfer, combining images, etc.
|
|
14
|
-
*
|
|
15
|
-
* Supports two modes:
|
|
16
|
-
* 1. Single image: Use image_b64 and image_mime_type
|
|
17
|
-
* 2. Multiple images: Use images array
|
|
18
|
-
*
|
|
19
|
-
* @param params - Image input parameters with transformation instructions
|
|
20
|
-
* @param _db - Database instance (unused, kept for API consistency)
|
|
21
|
-
* @param config - LLM API configuration
|
|
22
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
23
|
-
* @returns LLM response with transformed/generated image data
|
|
24
|
-
*/
|
|
25
|
-
export declare function hazo_llm_image_image(params: ImageImageParams, _db: SqlJsDatabase | null, config: LLMApiConfig, llm?: string): Promise<LLMResponse>;
|
|
26
|
-
//# sourceMappingURL=hazo_llm_image_image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_image.d.ts","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_image.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EAEb,MAAM,YAAY,CAAC;AAuBpB;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,aAAa,GAAG,IAAI,EACzB,MAAM,EAAE,YAAY,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,CAAC,CAwEtB"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_image_image Function
|
|
3
|
-
*
|
|
4
|
-
* Image(s) input → Image output
|
|
5
|
-
* Transform/edit/combine images based on text instructions.
|
|
6
|
-
* Supports single or multiple input images.
|
|
7
|
-
* Uses image generation capable models with input image(s).
|
|
8
|
-
*/
|
|
9
|
-
import { substitute_variables } from '../prompts/substitute_variables.js';
|
|
10
|
-
import { SERVICE_TYPES } from '../providers/types.js';
|
|
11
|
-
import { get_validated_provider, log_api_start, log_api_complete, log_api_details, log_api_response, handle_caught_error, } from './provider_helper.js';
|
|
12
|
-
// =============================================================================
|
|
13
|
-
// Constants
|
|
14
|
-
// =============================================================================
|
|
15
|
-
const FILE_NAME = 'hazo_llm_image_image.ts';
|
|
16
|
-
const API_NAME = 'image_image';
|
|
17
|
-
// =============================================================================
|
|
18
|
-
// hazo_llm_image_image Function
|
|
19
|
-
// =============================================================================
|
|
20
|
-
/**
|
|
21
|
-
* Call the LLM with image(s) input and get image output
|
|
22
|
-
* Used for image editing, transformation, style transfer, combining images, etc.
|
|
23
|
-
*
|
|
24
|
-
* Supports two modes:
|
|
25
|
-
* 1. Single image: Use image_b64 and image_mime_type
|
|
26
|
-
* 2. Multiple images: Use images array
|
|
27
|
-
*
|
|
28
|
-
* @param params - Image input parameters with transformation instructions
|
|
29
|
-
* @param _db - Database instance (unused, kept for API consistency)
|
|
30
|
-
* @param config - LLM API configuration
|
|
31
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
32
|
-
* @returns LLM response with transformed/generated image data
|
|
33
|
-
*/
|
|
34
|
-
export async function hazo_llm_image_image(params, _db, config, llm) {
|
|
35
|
-
// Use default logger if not provided
|
|
36
|
-
const { default_logger } = await import('./index.js');
|
|
37
|
-
const logger = config.logger || default_logger;
|
|
38
|
-
try {
|
|
39
|
-
log_api_start(API_NAME, FILE_NAME, logger);
|
|
40
|
-
// ==========================================================================
|
|
41
|
-
// Step 1: Validate and collect image data
|
|
42
|
-
// ==========================================================================
|
|
43
|
-
const images = [];
|
|
44
|
-
if (params.images && params.images.length > 0) {
|
|
45
|
-
images.push(...params.images);
|
|
46
|
-
}
|
|
47
|
-
else if (params.image_b64 && params.image_mime_type) {
|
|
48
|
-
images.push({
|
|
49
|
-
data: params.image_b64,
|
|
50
|
-
mime_type: params.image_mime_type,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (images.length === 0) {
|
|
54
|
-
const error_msg = 'At least one image is required. Provide image_b64/image_mime_type or images array.';
|
|
55
|
-
logger.error(error_msg, { file: FILE_NAME });
|
|
56
|
-
return { success: false, error: error_msg };
|
|
57
|
-
}
|
|
58
|
-
// ==========================================================================
|
|
59
|
-
// Step 2: Prepare prompt with variable substitution
|
|
60
|
-
// ==========================================================================
|
|
61
|
-
const final_prompt = substitute_variables(params.prompt, params.prompt_variables, logger);
|
|
62
|
-
// ==========================================================================
|
|
63
|
-
// Step 3: Get and validate provider
|
|
64
|
-
// ==========================================================================
|
|
65
|
-
const provider_result = get_validated_provider({
|
|
66
|
-
llm,
|
|
67
|
-
service_type: SERVICE_TYPES.IMAGE_IMAGE,
|
|
68
|
-
logger,
|
|
69
|
-
});
|
|
70
|
-
if (!provider_result.success) {
|
|
71
|
-
return provider_result.error_response;
|
|
72
|
-
}
|
|
73
|
-
const provider = provider_result.provider;
|
|
74
|
-
log_api_details(provider, SERVICE_TYPES.IMAGE_IMAGE, FILE_NAME, logger, {
|
|
75
|
-
prompt_text: final_prompt,
|
|
76
|
-
image_count: images.length,
|
|
77
|
-
llm_requested: llm || 'primary',
|
|
78
|
-
});
|
|
79
|
-
// ==========================================================================
|
|
80
|
-
// Step 4: Call the provider
|
|
81
|
-
// ==========================================================================
|
|
82
|
-
const response = await provider.image_image({
|
|
83
|
-
...params,
|
|
84
|
-
prompt: final_prompt,
|
|
85
|
-
}, logger);
|
|
86
|
-
log_api_response(response, FILE_NAME, logger);
|
|
87
|
-
log_api_complete(API_NAME, FILE_NAME, response.success, logger);
|
|
88
|
-
return response;
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
return handle_caught_error(error, 'hazo_llm_image_image', FILE_NAME, logger);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=hazo_llm_image_image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_image.js","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_image.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,SAAS,GAAG,yBAAyB,CAAC;AAC5C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. Combine images[0] + images[1] using prompts[0] → result_1
|
|
8
|
-
* 2. Combine result_1 + images[2] using prompts[1] → result_2
|
|
9
|
-
* 3. Continue chaining through all images
|
|
10
|
-
* 4. Analyze final result with description_prompt → text output
|
|
11
|
-
*
|
|
12
|
-
* Returns both the final generated image and the text description.
|
|
13
|
-
*/
|
|
14
|
-
import type { Database as SqlJsDatabase } from 'sql.js';
|
|
15
|
-
import type { ImageImageTextParams, LLMResponse, LLMApiConfig } from './types.js';
|
|
16
|
-
/**
|
|
17
|
-
* Chain multiple image transformations, then describe the final result
|
|
18
|
-
*
|
|
19
|
-
* @param params - Parameters with images, prompts, and description prompt
|
|
20
|
-
* @param db - Database instance
|
|
21
|
-
* @param config - LLM API configuration
|
|
22
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
23
|
-
* @returns LLM response with final image and description text
|
|
24
|
-
*/
|
|
25
|
-
export declare function hazo_llm_image_image_text(params: ImageImageTextParams, db: SqlJsDatabase | null, config: LLMApiConfig, llm?: string): Promise<LLMResponse>;
|
|
26
|
-
//# sourceMappingURL=hazo_llm_image_image_text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_image_text.d.ts","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_image_text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAQpB;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,oBAAoB,EAC5B,EAAE,EAAE,aAAa,GAAG,IAAI,EACxB,MAAM,EAAE,YAAY,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,CAAC,CAqOtB"}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_image_image_text Function
|
|
3
|
-
*
|
|
4
|
-
* Images → Image → Text (Chained)
|
|
5
|
-
*
|
|
6
|
-
* Flow:
|
|
7
|
-
* 1. Combine images[0] + images[1] using prompts[0] → result_1
|
|
8
|
-
* 2. Combine result_1 + images[2] using prompts[1] → result_2
|
|
9
|
-
* 3. Continue chaining through all images
|
|
10
|
-
* 4. Analyze final result with description_prompt → text output
|
|
11
|
-
*
|
|
12
|
-
* Returns both the final generated image and the text description.
|
|
13
|
-
*/
|
|
14
|
-
import { hazo_llm_image_image } from './hazo_llm_image_image.js';
|
|
15
|
-
import { hazo_llm_image_text } from './hazo_llm_image_text.js';
|
|
16
|
-
// =============================================================================
|
|
17
|
-
// hazo_llm_image_image_text Function
|
|
18
|
-
// =============================================================================
|
|
19
|
-
/**
|
|
20
|
-
* Chain multiple image transformations, then describe the final result
|
|
21
|
-
*
|
|
22
|
-
* @param params - Parameters with images, prompts, and description prompt
|
|
23
|
-
* @param db - Database instance
|
|
24
|
-
* @param config - LLM API configuration
|
|
25
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
26
|
-
* @returns LLM response with final image and description text
|
|
27
|
-
*/
|
|
28
|
-
export async function hazo_llm_image_image_text(params, db, config, llm) {
|
|
29
|
-
const file_name = 'hazo_llm_image_image_text.ts';
|
|
30
|
-
// Use default logger if not provided
|
|
31
|
-
const { default_logger } = await import('./index.js');
|
|
32
|
-
const logger = config.logger || default_logger;
|
|
33
|
-
const api_name = 'image_image_text';
|
|
34
|
-
try {
|
|
35
|
-
// ==========================================================================
|
|
36
|
-
// Log API call start
|
|
37
|
-
// ==========================================================================
|
|
38
|
-
logger.debug(`########################################################################### ${api_name}`, {
|
|
39
|
-
file: file_name,
|
|
40
|
-
line: 48,
|
|
41
|
-
});
|
|
42
|
-
// ==========================================================================
|
|
43
|
-
// Validate input
|
|
44
|
-
// ==========================================================================
|
|
45
|
-
if (!params.images || params.images.length < 2) {
|
|
46
|
-
const error_msg = 'At least two images are required';
|
|
47
|
-
logger.error(error_msg, { file: file_name, line: 58 });
|
|
48
|
-
return { success: false, error: error_msg };
|
|
49
|
-
}
|
|
50
|
-
const expected_prompts = params.images.length - 1;
|
|
51
|
-
if (!params.prompts || params.prompts.length !== expected_prompts) {
|
|
52
|
-
const error_msg = `Expected ${expected_prompts} prompts for ${params.images.length} images, got ${params.prompts?.length || 0}`;
|
|
53
|
-
logger.error(error_msg, { file: file_name, line: 65 });
|
|
54
|
-
return { success: false, error: error_msg };
|
|
55
|
-
}
|
|
56
|
-
if (!params.description_prompt?.trim()) {
|
|
57
|
-
const error_msg = 'Description prompt is required';
|
|
58
|
-
logger.error(error_msg, { file: file_name, line: 71 });
|
|
59
|
-
return { success: false, error: error_msg };
|
|
60
|
-
}
|
|
61
|
-
// Log API call details with generation configs
|
|
62
|
-
logger.debug('API call details', {
|
|
63
|
-
file: file_name,
|
|
64
|
-
line: 77,
|
|
65
|
-
data: {
|
|
66
|
-
chain_steps: Array.from({ length: params.images.length }, (_, i) => i < params.images.length - 1 ? 'image_image' : 'image_text'),
|
|
67
|
-
image_count: params.images.length,
|
|
68
|
-
prompts: params.prompts,
|
|
69
|
-
description_prompt: params.description_prompt,
|
|
70
|
-
image_data: params.images.map(img => ({
|
|
71
|
-
mime_type: img.image_mime_type,
|
|
72
|
-
data: '[IMAGE_DATA_PLACEHOLDER]',
|
|
73
|
-
})),
|
|
74
|
-
llm_requested: llm || 'primary',
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
// ==========================================================================
|
|
78
|
-
// Step 1: Combine first two images
|
|
79
|
-
// ==========================================================================
|
|
80
|
-
logger.debug('Chain Step 1: Combining first two images', {
|
|
81
|
-
file: file_name,
|
|
82
|
-
line: 94,
|
|
83
|
-
});
|
|
84
|
-
let current_result = await hazo_llm_image_image({
|
|
85
|
-
prompt: params.prompts[0],
|
|
86
|
-
images: [
|
|
87
|
-
{ data: params.images[0].image_b64, mime_type: params.images[0].image_mime_type },
|
|
88
|
-
{ data: params.images[1].image_b64, mime_type: params.images[1].image_mime_type },
|
|
89
|
-
],
|
|
90
|
-
}, db, config, llm);
|
|
91
|
-
if (!current_result.success) {
|
|
92
|
-
logger.error('Step 1 failed: combining first two images', {
|
|
93
|
-
file: file_name,
|
|
94
|
-
line: 111,
|
|
95
|
-
data: { error: current_result.error },
|
|
96
|
-
});
|
|
97
|
-
return {
|
|
98
|
-
success: false,
|
|
99
|
-
error: `Step 1 failed: ${current_result.error}`,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
if (!current_result.image_b64 || !current_result.image_mime_type) {
|
|
103
|
-
logger.error('Step 1 did not return an image', {
|
|
104
|
-
file: file_name,
|
|
105
|
-
line: 122,
|
|
106
|
-
});
|
|
107
|
-
return {
|
|
108
|
-
success: false,
|
|
109
|
-
error: 'Step 1 did not return an image',
|
|
110
|
-
text: current_result.text,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
// ==========================================================================
|
|
114
|
-
// Steps 2+: Chain through remaining images
|
|
115
|
-
// ==========================================================================
|
|
116
|
-
for (let i = 2; i < params.images.length; i++) {
|
|
117
|
-
const step_num = i;
|
|
118
|
-
const prompt_index = i - 1;
|
|
119
|
-
logger.debug(`Chain Step ${step_num}: Adding image ${i + 1}`, {
|
|
120
|
-
file: file_name,
|
|
121
|
-
line: 139,
|
|
122
|
-
});
|
|
123
|
-
// Combine current result with next image
|
|
124
|
-
current_result = await hazo_llm_image_image({
|
|
125
|
-
prompt: params.prompts[prompt_index],
|
|
126
|
-
images: [
|
|
127
|
-
{ data: current_result.image_b64, mime_type: current_result.image_mime_type },
|
|
128
|
-
{ data: params.images[i].image_b64, mime_type: params.images[i].image_mime_type },
|
|
129
|
-
],
|
|
130
|
-
}, db, config, llm);
|
|
131
|
-
if (!current_result.success) {
|
|
132
|
-
logger.error(`Step ${step_num} failed`, {
|
|
133
|
-
file: file_name,
|
|
134
|
-
line: 157,
|
|
135
|
-
data: { step: step_num, error: current_result.error },
|
|
136
|
-
});
|
|
137
|
-
return {
|
|
138
|
-
success: false,
|
|
139
|
-
error: `Step ${step_num} failed: ${current_result.error}`,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
if (!current_result.image_b64 || !current_result.image_mime_type) {
|
|
143
|
-
logger.error(`Step ${step_num} did not return an image`, {
|
|
144
|
-
file: file_name,
|
|
145
|
-
line: 168,
|
|
146
|
-
data: { step: step_num },
|
|
147
|
-
});
|
|
148
|
-
return {
|
|
149
|
-
success: false,
|
|
150
|
-
error: `Step ${step_num} did not return an image`,
|
|
151
|
-
text: current_result.text,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// ==========================================================================
|
|
156
|
-
// Final Step: Describe the final image
|
|
157
|
-
// ==========================================================================
|
|
158
|
-
logger.debug('Chain Final Step: Generating description', {
|
|
159
|
-
file: file_name,
|
|
160
|
-
line: 183,
|
|
161
|
-
});
|
|
162
|
-
const text_response = await hazo_llm_image_text({
|
|
163
|
-
prompt: params.description_prompt,
|
|
164
|
-
image_b64: current_result.image_b64,
|
|
165
|
-
image_mime_type: current_result.image_mime_type,
|
|
166
|
-
prompt_variables: params.description_prompt_variables,
|
|
167
|
-
}, db, config, llm);
|
|
168
|
-
if (!text_response.success) {
|
|
169
|
-
logger.error('Description generation failed', {
|
|
170
|
-
file: file_name,
|
|
171
|
-
line: 199,
|
|
172
|
-
data: { error: text_response.error },
|
|
173
|
-
});
|
|
174
|
-
return {
|
|
175
|
-
success: false,
|
|
176
|
-
error: `Description failed: ${text_response.error}`,
|
|
177
|
-
// Still return the final image even if description failed
|
|
178
|
-
image_b64: current_result.image_b64,
|
|
179
|
-
image_mime_type: current_result.image_mime_type,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
// ==========================================================================
|
|
183
|
-
// Log API response
|
|
184
|
-
// ==========================================================================
|
|
185
|
-
logger.debug('API response', {
|
|
186
|
-
file: file_name,
|
|
187
|
-
line: 215,
|
|
188
|
-
data: {
|
|
189
|
-
success: true,
|
|
190
|
-
text: text_response.text,
|
|
191
|
-
image_b64: '[IMAGE_DATA_PLACEHOLDER]',
|
|
192
|
-
image_mime_type: current_result.image_mime_type,
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
// Log API call complete
|
|
196
|
-
logger.debug(`<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ${api_name} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`, {
|
|
197
|
-
file: file_name,
|
|
198
|
-
line: 226,
|
|
199
|
-
data: {
|
|
200
|
-
success: true,
|
|
201
|
-
total_steps: params.images.length,
|
|
202
|
-
has_image: true,
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
return {
|
|
206
|
-
success: true,
|
|
207
|
-
text: text_response.text,
|
|
208
|
-
image_b64: current_result.image_b64,
|
|
209
|
-
image_mime_type: current_result.image_mime_type,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
catch (error) {
|
|
213
|
-
const error_message = error instanceof Error ? error.message : String(error);
|
|
214
|
-
logger.error('Error in hazo_llm_image_image_text', {
|
|
215
|
-
file: file_name,
|
|
216
|
-
line: 231,
|
|
217
|
-
data: { error: error_message },
|
|
218
|
-
});
|
|
219
|
-
return { success: false, error: error_message };
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
//# sourceMappingURL=hazo_llm_image_image_text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_image_text.js","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_image_text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,gFAAgF;AAChF,qCAAqC;AACrC,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,C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,KAAK,CAAC,cAAc,EAAE;YAC3B,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,GAAG;YACT,IAAI,EAAE;gBACJ,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,aAAa,CAAC,IAAI;gBACxB,SAAS,EAAE,0BAA0B;gBACrC,eAAe,EAAE,cAAc,CAAC,eAAe;aAChD;SACF,CAAC,CAAC;QAEH,wBAAwB;QACxB,MAAM,CAAC,KAAK,CAAC,oCAAoC,QAAQ,mCAAmC,EAAE;YAC5F,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,GAAG;YACT,IAAI,EAAE;gBACJ,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;gBACjC,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,SAAS,EAAE,cAAc,CAAC,SAAS;YACnC,eAAe,EAAE,cAAc,CAAC,eAAe;SAChD,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,aAAa,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7E,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE;YACjD,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;SAC/B,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_image_text Function
|
|
3
|
-
*
|
|
4
|
-
* Image input → Text output
|
|
5
|
-
* Analyze an image and get text description/response.
|
|
6
|
-
* Supports image analysis, OCR, object detection descriptions, etc.
|
|
7
|
-
*/
|
|
8
|
-
import type { Database as SqlJsDatabase } from 'sql.js';
|
|
9
|
-
import type { ImageTextParams, LLMResponse, LLMApiConfig } from './types.js';
|
|
10
|
-
/**
|
|
11
|
-
* Call the LLM with an image input and get text output
|
|
12
|
-
*
|
|
13
|
-
* @param params - Image input parameters
|
|
14
|
-
* @param _db - Database instance (unused, kept for API consistency)
|
|
15
|
-
* @param config - LLM API configuration
|
|
16
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
17
|
-
* @returns LLM response with generated text description
|
|
18
|
-
*/
|
|
19
|
-
export declare function hazo_llm_image_text(params: ImageTextParams, _db: SqlJsDatabase | null, config: LLMApiConfig, llm?: string): Promise<LLMResponse>;
|
|
20
|
-
//# sourceMappingURL=hazo_llm_image_text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_text.d.ts","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAuBpB;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,aAAa,GAAG,IAAI,EACzB,MAAM,EAAE,YAAY,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,CAAC,CA6DtB"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_image_text Function
|
|
3
|
-
*
|
|
4
|
-
* Image input → Text output
|
|
5
|
-
* Analyze an image and get text description/response.
|
|
6
|
-
* Supports image analysis, OCR, object detection descriptions, etc.
|
|
7
|
-
*/
|
|
8
|
-
import { substitute_variables } from '../prompts/substitute_variables.js';
|
|
9
|
-
import { SERVICE_TYPES } from '../providers/types.js';
|
|
10
|
-
import { get_validated_provider, log_api_start, log_api_complete, log_api_details, log_api_response, handle_caught_error, } from './provider_helper.js';
|
|
11
|
-
// =============================================================================
|
|
12
|
-
// Constants
|
|
13
|
-
// =============================================================================
|
|
14
|
-
const FILE_NAME = 'hazo_llm_image_text.ts';
|
|
15
|
-
const API_NAME = 'image_text';
|
|
16
|
-
// =============================================================================
|
|
17
|
-
// hazo_llm_image_text Function
|
|
18
|
-
// =============================================================================
|
|
19
|
-
/**
|
|
20
|
-
* Call the LLM with an image input and get text output
|
|
21
|
-
*
|
|
22
|
-
* @param params - Image input parameters
|
|
23
|
-
* @param _db - Database instance (unused, kept for API consistency)
|
|
24
|
-
* @param config - LLM API configuration
|
|
25
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
26
|
-
* @returns LLM response with generated text description
|
|
27
|
-
*/
|
|
28
|
-
export async function hazo_llm_image_text(params, _db, config, llm) {
|
|
29
|
-
// Use default logger if not provided
|
|
30
|
-
const { default_logger } = await import('./index.js');
|
|
31
|
-
const logger = config.logger || default_logger;
|
|
32
|
-
try {
|
|
33
|
-
log_api_start(API_NAME, FILE_NAME, logger);
|
|
34
|
-
// ==========================================================================
|
|
35
|
-
// Step 1: Validate image data
|
|
36
|
-
// ==========================================================================
|
|
37
|
-
if (!params.image_b64 || !params.image_mime_type) {
|
|
38
|
-
const error_msg = 'image_b64 and image_mime_type are required';
|
|
39
|
-
logger.error(error_msg, { file: FILE_NAME });
|
|
40
|
-
return { success: false, error: error_msg };
|
|
41
|
-
}
|
|
42
|
-
// ==========================================================================
|
|
43
|
-
// Step 2: Prepare prompt with variable substitution
|
|
44
|
-
// ==========================================================================
|
|
45
|
-
const final_prompt = substitute_variables(params.prompt, params.prompt_variables, logger);
|
|
46
|
-
// ==========================================================================
|
|
47
|
-
// Step 3: Get and validate provider
|
|
48
|
-
// ==========================================================================
|
|
49
|
-
const provider_result = get_validated_provider({
|
|
50
|
-
llm,
|
|
51
|
-
service_type: SERVICE_TYPES.IMAGE_TEXT,
|
|
52
|
-
logger,
|
|
53
|
-
});
|
|
54
|
-
if (!provider_result.success) {
|
|
55
|
-
return provider_result.error_response;
|
|
56
|
-
}
|
|
57
|
-
const provider = provider_result.provider;
|
|
58
|
-
log_api_details(provider, SERVICE_TYPES.IMAGE_TEXT, FILE_NAME, logger, {
|
|
59
|
-
prompt_text: final_prompt,
|
|
60
|
-
image_mime_type: params.image_mime_type,
|
|
61
|
-
llm_requested: llm || 'primary',
|
|
62
|
-
});
|
|
63
|
-
// ==========================================================================
|
|
64
|
-
// Step 4: Call the provider
|
|
65
|
-
// ==========================================================================
|
|
66
|
-
const response = await provider.image_text({
|
|
67
|
-
...params,
|
|
68
|
-
prompt: final_prompt,
|
|
69
|
-
}, logger);
|
|
70
|
-
log_api_response(response, FILE_NAME, logger);
|
|
71
|
-
log_api_complete(API_NAME, FILE_NAME, response.success, logger);
|
|
72
|
-
return response;
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
return handle_caught_error(error, 'hazo_llm_image_text', FILE_NAME, logger);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=hazo_llm_image_text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_image_text.js","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_image_text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,SAAS,GAA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AAC;QAE1C,eAAe,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE;YACrE,WAAW,EAAE,YAAY;YACzB,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,aAAa,EAAE,GAAG,IAAI,SAAS;SAChC,CAAC,CAAC;QAEH,6EAA6E;QAC7E,4BAA4B;QAC5B,6EAA6E;QAC7E,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,UAAU,CACxC;YACE,GAAG,MAAM;YACT,MAAM,EAAE,YAAY;SACrB,EACD,MAAM,CACP,CAAC;QAEF,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAC9C,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEhE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hazo_llm_text_image Function
|
|
3
|
-
*
|
|
4
|
-
* Text input → Image output
|
|
5
|
-
* Generate an image from a text description/prompt.
|
|
6
|
-
* Uses image generation capable models.
|
|
7
|
-
*/
|
|
8
|
-
import type { Database as SqlJsDatabase } from 'sql.js';
|
|
9
|
-
import type { TextImageParams, LLMResponse, LLMApiConfig } from './types.js';
|
|
10
|
-
/**
|
|
11
|
-
* Call the LLM with text input and get image output
|
|
12
|
-
*
|
|
13
|
-
* @param params - Text input parameters for image generation
|
|
14
|
-
* @param _db - Database instance (unused, kept for API consistency)
|
|
15
|
-
* @param config - LLM API configuration
|
|
16
|
-
* @param llm - Optional LLM provider name (uses primary LLM if not specified)
|
|
17
|
-
* @returns LLM response with generated image data
|
|
18
|
-
*/
|
|
19
|
-
export declare function hazo_llm_text_image(params: TextImageParams, _db: SqlJsDatabase | null, config: LLMApiConfig, llm?: string): Promise<LLMResponse>;
|
|
20
|
-
//# sourceMappingURL=hazo_llm_text_image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_text_image.d.ts","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_text_image.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAuBpB;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,aAAa,GAAG,IAAI,EACzB,MAAM,EAAE,YAAY,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,CAAC,CAmDtB"}
|