hazo_llm_api 1.0.2 → 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 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -13
- 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 -8
- package/dist/lib/database/index.js.map +0 -1
- package/dist/lib/database/init_database.d.ts +0 -62
- package/dist/lib/database/init_database.d.ts.map +0 -1
- package/dist/lib/database/init_database.js +0 -436
- 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 -92
- 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 -220
- 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 -76
- 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 -67
- 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 -152
- 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 -89
- package/dist/lib/llm_api/hazo_llm_text_text.js.map +0 -1
- package/dist/lib/llm_api/index.d.ts +0 -99
- package/dist/lib/llm_api/index.d.ts.map +0 -1
- package/dist/lib/llm_api/index.js +0 -952
- package/dist/lib/llm_api/index.js.map +0 -1
- package/dist/lib/llm_api/provider_helper.d.ts +0 -107
- package/dist/lib/llm_api/provider_helper.d.ts.map +0 -1
- package/dist/lib/llm_api/provider_helper.js +0 -159
- package/dist/lib/llm_api/provider_helper.js.map +0 -1
- package/dist/lib/llm_api/types.d.ts +0 -352
- package/dist/lib/llm_api/types.d.ts.map +0 -1
- package/dist/lib/llm_api/types.js +0 -8
- 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 -95
- package/dist/lib/providers/types.d.ts.map +0 -1
- package/dist/lib/providers/types.js +0 -19
- package/dist/lib/providers/types.js.map +0 -1
- package/dist/server.d.ts +0 -21
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -32
- package/dist/server.js.map +0 -1
|
@@ -1,92 +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
|
-
const logger = config.logger;
|
|
36
|
-
try {
|
|
37
|
-
log_api_start(API_NAME, FILE_NAME, logger);
|
|
38
|
-
// ==========================================================================
|
|
39
|
-
// Step 1: Validate and collect image data
|
|
40
|
-
// ==========================================================================
|
|
41
|
-
const images = [];
|
|
42
|
-
if (params.images && params.images.length > 0) {
|
|
43
|
-
images.push(...params.images);
|
|
44
|
-
}
|
|
45
|
-
else if (params.image_b64 && params.image_mime_type) {
|
|
46
|
-
images.push({
|
|
47
|
-
data: params.image_b64,
|
|
48
|
-
mime_type: params.image_mime_type,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (images.length === 0) {
|
|
52
|
-
const error_msg = 'At least one image is required. Provide image_b64/image_mime_type or images array.';
|
|
53
|
-
logger.error(error_msg, { file: FILE_NAME });
|
|
54
|
-
return { success: false, error: error_msg };
|
|
55
|
-
}
|
|
56
|
-
// ==========================================================================
|
|
57
|
-
// Step 2: Prepare prompt with variable substitution
|
|
58
|
-
// ==========================================================================
|
|
59
|
-
const final_prompt = substitute_variables(params.prompt, params.prompt_variables, logger);
|
|
60
|
-
// ==========================================================================
|
|
61
|
-
// Step 3: Get and validate provider
|
|
62
|
-
// ==========================================================================
|
|
63
|
-
const provider_result = get_validated_provider({
|
|
64
|
-
llm,
|
|
65
|
-
service_type: SERVICE_TYPES.IMAGE_IMAGE,
|
|
66
|
-
logger,
|
|
67
|
-
});
|
|
68
|
-
if (!provider_result.success) {
|
|
69
|
-
return provider_result.error_response;
|
|
70
|
-
}
|
|
71
|
-
const provider = provider_result.provider;
|
|
72
|
-
log_api_details(provider, SERVICE_TYPES.IMAGE_IMAGE, FILE_NAME, logger, {
|
|
73
|
-
prompt_text: final_prompt,
|
|
74
|
-
image_count: images.length,
|
|
75
|
-
llm_requested: llm || 'primary',
|
|
76
|
-
});
|
|
77
|
-
// ==========================================================================
|
|
78
|
-
// Step 4: Call the provider
|
|
79
|
-
// ==========================================================================
|
|
80
|
-
const response = await provider.image_image({
|
|
81
|
-
...params,
|
|
82
|
-
prompt: final_prompt,
|
|
83
|
-
}, logger);
|
|
84
|
-
log_api_response(response, FILE_NAME, logger);
|
|
85
|
-
log_api_complete(API_NAME, FILE_NAME, response.success, logger);
|
|
86
|
-
return response;
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
return handle_caught_error(error, 'hazo_llm_image_image', FILE_NAME, logger);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//# 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,MAAM,QAAQ,GAAG,aAAa,CAAC;AAE/B,gFAAgF;AAChF,gCAAgC;AAChC,gFAAgF;AAEhF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAwB,EACxB,GAAyB,EACzB,MAAoB,EACpB,GAAY;IAEZ,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,IAAI,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE3C,6EAA6E;QAC7E,0CAA0C;QAC1C,6EAA6E;QAC7E,MAAM,MAAM,GAAiB,EAAE,CAAC;QAEhC,IAAI,MAAM,CAAC,MAAM,IAA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AS;SAChC,CAAC,CAAC;QAEH,6EAA6E;QAC7E,4BAA4B;QAC5B,6EAA6E;QAC7E,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,WAAW,CACzC;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,sBAAsB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC"}
|
|
@@ -1,26 +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 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,CAmOtB"}
|
|
@@ -1,220 +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
|
-
const logger = config.logger;
|
|
31
|
-
const api_name = 'image_image_text';
|
|
32
|
-
try {
|
|
33
|
-
// ==========================================================================
|
|
34
|
-
// Log API call start
|
|
35
|
-
// ==========================================================================
|
|
36
|
-
logger.debug(`########################################################################### ${api_name}`, {
|
|
37
|
-
file: file_name,
|
|
38
|
-
line: 48,
|
|
39
|
-
});
|
|
40
|
-
// ==========================================================================
|
|
41
|
-
// Validate input
|
|
42
|
-
// ==========================================================================
|
|
43
|
-
if (!params.images || params.images.length < 2) {
|
|
44
|
-
const error_msg = 'At least two images are required';
|
|
45
|
-
logger.error(error_msg, { file: file_name, line: 58 });
|
|
46
|
-
return { success: false, error: error_msg };
|
|
47
|
-
}
|
|
48
|
-
const expected_prompts = params.images.length - 1;
|
|
49
|
-
if (!params.prompts || params.prompts.length !== expected_prompts) {
|
|
50
|
-
const error_msg = `Expected ${expected_prompts} prompts for ${params.images.length} images, got ${params.prompts?.length || 0}`;
|
|
51
|
-
logger.error(error_msg, { file: file_name, line: 65 });
|
|
52
|
-
return { success: false, error: error_msg };
|
|
53
|
-
}
|
|
54
|
-
if (!params.description_prompt?.trim()) {
|
|
55
|
-
const error_msg = 'Description prompt is required';
|
|
56
|
-
logger.error(error_msg, { file: file_name, line: 71 });
|
|
57
|
-
return { success: false, error: error_msg };
|
|
58
|
-
}
|
|
59
|
-
// Log API call details with generation configs
|
|
60
|
-
logger.debug('API call details', {
|
|
61
|
-
file: file_name,
|
|
62
|
-
line: 77,
|
|
63
|
-
data: {
|
|
64
|
-
chain_steps: Array.from({ length: params.images.length }, (_, i) => i < params.images.length - 1 ? 'image_image' : 'image_text'),
|
|
65
|
-
image_count: params.images.length,
|
|
66
|
-
prompts: params.prompts,
|
|
67
|
-
description_prompt: params.description_prompt,
|
|
68
|
-
image_data: params.images.map(img => ({
|
|
69
|
-
mime_type: img.image_mime_type,
|
|
70
|
-
data: '[IMAGE_DATA_PLACEHOLDER]',
|
|
71
|
-
})),
|
|
72
|
-
llm_requested: llm || 'primary',
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
// ==========================================================================
|
|
76
|
-
// Step 1: Combine first two images
|
|
77
|
-
// ==========================================================================
|
|
78
|
-
logger.debug('Chain Step 1: Combining first two images', {
|
|
79
|
-
file: file_name,
|
|
80
|
-
line: 94,
|
|
81
|
-
});
|
|
82
|
-
let current_result = await hazo_llm_image_image({
|
|
83
|
-
prompt: params.prompts[0],
|
|
84
|
-
images: [
|
|
85
|
-
{ data: params.images[0].image_b64, mime_type: params.images[0].image_mime_type },
|
|
86
|
-
{ data: params.images[1].image_b64, mime_type: params.images[1].image_mime_type },
|
|
87
|
-
],
|
|
88
|
-
}, db, config, llm);
|
|
89
|
-
if (!current_result.success) {
|
|
90
|
-
logger.error('Step 1 failed: combining first two images', {
|
|
91
|
-
file: file_name,
|
|
92
|
-
line: 111,
|
|
93
|
-
data: { error: current_result.error },
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
success: false,
|
|
97
|
-
error: `Step 1 failed: ${current_result.error}`,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (!current_result.image_b64 || !current_result.image_mime_type) {
|
|
101
|
-
logger.error('Step 1 did not return an image', {
|
|
102
|
-
file: file_name,
|
|
103
|
-
line: 122,
|
|
104
|
-
});
|
|
105
|
-
return {
|
|
106
|
-
success: false,
|
|
107
|
-
error: 'Step 1 did not return an image',
|
|
108
|
-
text: current_result.text,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
// ==========================================================================
|
|
112
|
-
// Steps 2+: Chain through remaining images
|
|
113
|
-
// ==========================================================================
|
|
114
|
-
for (let i = 2; i < params.images.length; i++) {
|
|
115
|
-
const step_num = i;
|
|
116
|
-
const prompt_index = i - 1;
|
|
117
|
-
logger.debug(`Chain Step ${step_num}: Adding image ${i + 1}`, {
|
|
118
|
-
file: file_name,
|
|
119
|
-
line: 139,
|
|
120
|
-
});
|
|
121
|
-
// Combine current result with next image
|
|
122
|
-
current_result = await hazo_llm_image_image({
|
|
123
|
-
prompt: params.prompts[prompt_index],
|
|
124
|
-
images: [
|
|
125
|
-
{ data: current_result.image_b64, mime_type: current_result.image_mime_type },
|
|
126
|
-
{ data: params.images[i].image_b64, mime_type: params.images[i].image_mime_type },
|
|
127
|
-
],
|
|
128
|
-
}, db, config, llm);
|
|
129
|
-
if (!current_result.success) {
|
|
130
|
-
logger.error(`Step ${step_num} failed`, {
|
|
131
|
-
file: file_name,
|
|
132
|
-
line: 157,
|
|
133
|
-
data: { step: step_num, error: current_result.error },
|
|
134
|
-
});
|
|
135
|
-
return {
|
|
136
|
-
success: false,
|
|
137
|
-
error: `Step ${step_num} failed: ${current_result.error}`,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
if (!current_result.image_b64 || !current_result.image_mime_type) {
|
|
141
|
-
logger.error(`Step ${step_num} did not return an image`, {
|
|
142
|
-
file: file_name,
|
|
143
|
-
line: 168,
|
|
144
|
-
data: { step: step_num },
|
|
145
|
-
});
|
|
146
|
-
return {
|
|
147
|
-
success: false,
|
|
148
|
-
error: `Step ${step_num} did not return an image`,
|
|
149
|
-
text: current_result.text,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// ==========================================================================
|
|
154
|
-
// Final Step: Describe the final image
|
|
155
|
-
// ==========================================================================
|
|
156
|
-
logger.debug('Chain Final Step: Generating description', {
|
|
157
|
-
file: file_name,
|
|
158
|
-
line: 183,
|
|
159
|
-
});
|
|
160
|
-
const text_response = await hazo_llm_image_text({
|
|
161
|
-
prompt: params.description_prompt,
|
|
162
|
-
image_b64: current_result.image_b64,
|
|
163
|
-
image_mime_type: current_result.image_mime_type,
|
|
164
|
-
prompt_variables: params.description_prompt_variables,
|
|
165
|
-
}, db, config, llm);
|
|
166
|
-
if (!text_response.success) {
|
|
167
|
-
logger.error('Description generation failed', {
|
|
168
|
-
file: file_name,
|
|
169
|
-
line: 199,
|
|
170
|
-
data: { error: text_response.error },
|
|
171
|
-
});
|
|
172
|
-
return {
|
|
173
|
-
success: false,
|
|
174
|
-
error: `Description failed: ${text_response.error}`,
|
|
175
|
-
// Still return the final image even if description failed
|
|
176
|
-
image_b64: current_result.image_b64,
|
|
177
|
-
image_mime_type: current_result.image_mime_type,
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
// ==========================================================================
|
|
181
|
-
// Log API response
|
|
182
|
-
// ==========================================================================
|
|
183
|
-
logger.debug('API response', {
|
|
184
|
-
file: file_name,
|
|
185
|
-
line: 215,
|
|
186
|
-
data: {
|
|
187
|
-
success: true,
|
|
188
|
-
text: text_response.text,
|
|
189
|
-
image_b64: '[IMAGE_DATA_PLACEHOLDER]',
|
|
190
|
-
image_mime_type: current_result.image_mime_type,
|
|
191
|
-
},
|
|
192
|
-
});
|
|
193
|
-
// Log API call complete
|
|
194
|
-
logger.debug(`<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ${api_name} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`, {
|
|
195
|
-
file: file_name,
|
|
196
|
-
line: 226,
|
|
197
|
-
data: {
|
|
198
|
-
success: true,
|
|
199
|
-
total_steps: params.images.length,
|
|
200
|
-
has_image: true,
|
|
201
|
-
},
|
|
202
|
-
});
|
|
203
|
-
return {
|
|
204
|
-
success: true,
|
|
205
|
-
text: text_response.text,
|
|
206
|
-
image_b64: current_result.image_b64,
|
|
207
|
-
image_mime_type: current_result.image_mime_type,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
const error_message = error instanceof Error ? error.message : String(error);
|
|
212
|
-
logger.error('Error in hazo_llm_image_image_text', {
|
|
213
|
-
file: file_name,
|
|
214
|
-
line: 231,
|
|
215
|
-
data: { error: error_message },
|
|
216
|
-
});
|
|
217
|
-
return { success: false, error: error_message };
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
//# 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,CAAC,KAAK,UAAU,yBAAyB,CAC7C,MAA4B,EAC5B,EAAwB,EACxB,MAAoB,EACpB,GAAY;IAEZ,MAAM,SAAS,GAAG,8BAA8B,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,MAAM,QAAQ,GAAG,kBAAkB,CAAC;IAEpC,IAAI,CAAC;QACH,6EAA6E;QAC7E,qBAAqB;QACrB,6EAA6E;QAC7E,MAAM,CAAC,KAAK,CAAC,+EAA+E,QAAQ,EAAE,EAAE;YACtG,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;QAEH,6EAA6E;QAC7E,iBAAiB;QACjB,6EAA6E;QAC7E,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/C,MAAM,SAAS,GAAG,kCAAkC,CAAC;YACrD,MAAM,CAAC,KAAK,CAAC,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AAM,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,CA2DtB"}
|
|
@@ -1,76 +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
|
-
const logger = config.logger;
|
|
30
|
-
try {
|
|
31
|
-
log_api_start(API_NAME, FILE_NAME, logger);
|
|
32
|
-
// ==========================================================================
|
|
33
|
-
// Step 1: Validate image data
|
|
34
|
-
// ==========================================================================
|
|
35
|
-
if (!params.image_b64 || !params.image_mime_type) {
|
|
36
|
-
const error_msg = 'image_b64 and image_mime_type are required';
|
|
37
|
-
logger.error(error_msg, { file: FILE_NAME });
|
|
38
|
-
return { success: false, error: error_msg };
|
|
39
|
-
}
|
|
40
|
-
// ==========================================================================
|
|
41
|
-
// Step 2: Prepare prompt with variable substitution
|
|
42
|
-
// ==========================================================================
|
|
43
|
-
const final_prompt = substitute_variables(params.prompt, params.prompt_variables, logger);
|
|
44
|
-
// ==========================================================================
|
|
45
|
-
// Step 3: Get and validate provider
|
|
46
|
-
// ==========================================================================
|
|
47
|
-
const provider_result = get_validated_provider({
|
|
48
|
-
llm,
|
|
49
|
-
service_type: SERVICE_TYPES.IMAGE_TEXT,
|
|
50
|
-
logger,
|
|
51
|
-
});
|
|
52
|
-
if (!provider_result.success) {
|
|
53
|
-
return provider_result.error_response;
|
|
54
|
-
}
|
|
55
|
-
const provider = provider_result.provider;
|
|
56
|
-
log_api_details(provider, SERVICE_TYPES.IMAGE_TEXT, FILE_NAME, logger, {
|
|
57
|
-
prompt_text: final_prompt,
|
|
58
|
-
image_mime_type: params.image_mime_type,
|
|
59
|
-
llm_requested: llm || 'primary',
|
|
60
|
-
});
|
|
61
|
-
// ==========================================================================
|
|
62
|
-
// Step 4: Call the provider
|
|
63
|
-
// ==========================================================================
|
|
64
|
-
const response = await provider.image_text({
|
|
65
|
-
...params,
|
|
66
|
-
prompt: final_prompt,
|
|
67
|
-
}, logger);
|
|
68
|
-
log_api_response(response, FILE_NAME, logger);
|
|
69
|
-
log_api_complete(API_NAME, FILE_NAME, response.success, logger);
|
|
70
|
-
return response;
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
return handle_caught_error(error, 'hazo_llm_image_text', FILE_NAME, logger);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//# 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,GAAG,wBAAwB,CAAC;AAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAuB,EACvB,GAAyB,EACzB,MAAoB,EACpB,GAAY;IAEZ,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,IAAI,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE3C,6EAA6E;QAC7E,8BAA8B;QAC9B,6EAA6E;QAC7E,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;YACjD,MAAM,SAAS,GAAG,4CAA4C,CAAC;YAC/D,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;YAC7C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC9C,CAAC;QAED,6EAA6E;QAC7E,oDAAoD;QACpD,6EAA6E;QAC7E,MAAM,YAAY,GAAG,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;QAE1F,6EAA6E;QAC7E,oCAAoC;QACpC,6EAA6E;QAC7E,MAAM,eAAe,GAAG,sBAAsB,CAAC;YAC7C,GAAG;YACH,YAAY,EAAE,aAAa,CAAC,UAAU;YACtC,MAAM;SACP,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;YAC7B,OAAO,eAAe,CAAC,cAAc,CAAC;QACxC,CAAC;QAED,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;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,CAiDtB"}
|
|
@@ -1,67 +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 { 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_text_image.ts';
|
|
15
|
-
const API_NAME = 'text_image';
|
|
16
|
-
// =============================================================================
|
|
17
|
-
// hazo_llm_text_image Function
|
|
18
|
-
// =============================================================================
|
|
19
|
-
/**
|
|
20
|
-
* Call the LLM with text input and get image output
|
|
21
|
-
*
|
|
22
|
-
* @param params - Text input parameters for image generation
|
|
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 image data
|
|
27
|
-
*/
|
|
28
|
-
export async function hazo_llm_text_image(params, _db, config, llm) {
|
|
29
|
-
const logger = config.logger;
|
|
30
|
-
try {
|
|
31
|
-
log_api_start(API_NAME, FILE_NAME, logger);
|
|
32
|
-
// ==========================================================================
|
|
33
|
-
// Step 1: Prepare prompt with variable substitution
|
|
34
|
-
// ==========================================================================
|
|
35
|
-
const final_prompt = substitute_variables(params.prompt, params.prompt_variables, logger);
|
|
36
|
-
// ==========================================================================
|
|
37
|
-
// Step 2: Get and validate provider
|
|
38
|
-
// ==========================================================================
|
|
39
|
-
const provider_result = get_validated_provider({
|
|
40
|
-
llm,
|
|
41
|
-
service_type: SERVICE_TYPES.TEXT_IMAGE,
|
|
42
|
-
logger,
|
|
43
|
-
});
|
|
44
|
-
if (!provider_result.success) {
|
|
45
|
-
return provider_result.error_response;
|
|
46
|
-
}
|
|
47
|
-
const provider = provider_result.provider;
|
|
48
|
-
log_api_details(provider, SERVICE_TYPES.TEXT_IMAGE, FILE_NAME, logger, {
|
|
49
|
-
prompt_text: final_prompt,
|
|
50
|
-
llm_requested: llm || 'primary',
|
|
51
|
-
});
|
|
52
|
-
// ==========================================================================
|
|
53
|
-
// Step 3: Call the provider
|
|
54
|
-
// ==========================================================================
|
|
55
|
-
const response = await provider.text_image({
|
|
56
|
-
...params,
|
|
57
|
-
prompt: final_prompt,
|
|
58
|
-
}, logger);
|
|
59
|
-
log_api_response(response, FILE_NAME, logger);
|
|
60
|
-
log_api_complete(API_NAME, FILE_NAME, response.success, logger);
|
|
61
|
-
return response;
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
return handle_caught_error(error, 'hazo_llm_text_image', FILE_NAME, logger);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=hazo_llm_text_image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_text_image.js","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_text_image.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,GAAG,wBAAwB,CAAC;AAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAuB,EACvB,GAAyB,EACzB,MAAoB,EACpB,GAAY;IAEZ,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,IAAI,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE3C,6EAA6E;QAC7E,oD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. Generate an image from prompt_image using hazo_llm_text_image
|
|
6
|
-
* 2. Analyze the generated image with prompt_text using hazo_llm_image_text
|
|
7
|
-
* 3. Return both the generated image and the analysis text
|
|
8
|
-
*/
|
|
9
|
-
import type { Database as SqlJsDatabase } from 'sql.js';
|
|
10
|
-
import type { TextImageTextParams, LLMResponse, LLMApiConfig } from './types.js';
|
|
11
|
-
/**
|
|
12
|
-
* Generate an image from text, then analyze it with a second prompt
|
|
13
|
-
*
|
|
14
|
-
* Flow:
|
|
15
|
-
* 1. Call hazo_llm_text_image with prompt_image to generate an image
|
|
16
|
-
* 2. Call hazo_llm_image_text with the generated image and prompt_text
|
|
17
|
-
* 3. Return the generated image and the text analysis from step 2
|
|
18
|
-
*
|
|
19
|
-
* @param params - Parameters with two prompts: one for image gen, one for analysis
|
|
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 generated image and analysis text
|
|
24
|
-
*/
|
|
25
|
-
export declare function hazo_llm_text_image_text(params: TextImageTextParams, db: SqlJsDatabase | null, config: LLMApiConfig, llm?: string): Promise<LLMResponse>;
|
|
26
|
-
//# sourceMappingURL=hazo_llm_text_image_text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_llm_text_image_text.d.ts","sourceRoot":"","sources":["../../../src/lib/llm_api/hazo_llm_text_image_text.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAQpB;;;;;;;;;;;;;GAaG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,mBAAmB,EAC3B,EAAE,EAAE,aAAa,GAAG,IAAI,EACxB,MAAM,EAAE,YAAY,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,CAAC,CAkJtB"}
|