@byted-las/contextlake-openclaw 1.0.6 → 1.0.8
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/dist/src/commands/cli.d.ts +0 -2
- package/dist/src/commands/cli.js +0 -46
- package/dist/src/commands/index.js +0 -29
- package/dist/src/commands/slashcmd.d.ts +0 -6
- package/dist/src/commands/slashcmd.js +0 -87
- package/dist/src/commands/tools.d.ts +0 -2
- package/dist/src/commands/tools.js +0 -94
- package/dist/src/skills/contextlake-ingest/SKILL.md +55 -38
- package/dist/src/skills/las-data-profiler/SKILL.md +24 -18
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/src/commands/cli.ts +0 -45
- package/src/commands/index.ts +0 -35
- package/src/commands/slashcmd.ts +0 -59
- package/src/commands/tools.ts +0 -99
- package/src/skills/contextlake-ingest/SKILL.md +55 -38
- package/src/skills/las-data-profiler/SKILL.md +24 -18
- package/dist/src/lib/actions/ingest-source.d.ts +0 -15
- package/dist/src/lib/actions/ingest-source.js +0 -193
- package/dist/src/lib/actions/las.d.ts +0 -64
- package/dist/src/lib/actions/las.js +0 -72
- package/dist/src/lib/scripts/s3_catalog.py +0 -617
- package/dist/src/service/embedding/local.d.ts +0 -14
- package/dist/src/service/embedding/local.js +0 -107
- package/dist/src/skills/SKILL.md +0 -39
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ContextLakeConfig } from '../../utils/config';
|
|
2
|
-
export declare function lasPdfParseDoubao(params: {
|
|
3
|
-
url: string;
|
|
4
|
-
start_page?: number;
|
|
5
|
-
num_pages?: number;
|
|
6
|
-
parse_mode?: string;
|
|
7
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
8
|
-
export declare function lasLongVideoUnderstand(params: {
|
|
9
|
-
video_url: string;
|
|
10
|
-
prompt: string;
|
|
11
|
-
system_prompt?: string;
|
|
12
|
-
return_chunk_text?: boolean;
|
|
13
|
-
max_tokens?: number;
|
|
14
|
-
temperature?: number;
|
|
15
|
-
top_p?: number;
|
|
16
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
17
|
-
export declare function lasBareImageTextEmbedding(params: {
|
|
18
|
-
input: Array<{
|
|
19
|
-
type: string;
|
|
20
|
-
text?: string;
|
|
21
|
-
image_url?: string;
|
|
22
|
-
}>;
|
|
23
|
-
encoding_format?: string;
|
|
24
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
25
|
-
export declare function lasSeed20(params: {
|
|
26
|
-
model: string;
|
|
27
|
-
messages: Array<any>;
|
|
28
|
-
stream?: boolean;
|
|
29
|
-
max_tokens?: number;
|
|
30
|
-
temperature?: number;
|
|
31
|
-
top_p?: number;
|
|
32
|
-
frequency_penalty?: number;
|
|
33
|
-
presence_penalty?: number;
|
|
34
|
-
tools?: Array<any>;
|
|
35
|
-
tool_choice?: any;
|
|
36
|
-
user?: string;
|
|
37
|
-
logprobs?: boolean;
|
|
38
|
-
top_logprobs?: number;
|
|
39
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
40
|
-
export declare function lasAsrPro(params: {
|
|
41
|
-
url?: string;
|
|
42
|
-
format?: string;
|
|
43
|
-
language?: string;
|
|
44
|
-
resource?: string;
|
|
45
|
-
use_itn?: boolean;
|
|
46
|
-
use_sn?: boolean;
|
|
47
|
-
enable_alignment?: boolean;
|
|
48
|
-
channel_id?: number;
|
|
49
|
-
use_word_info?: boolean;
|
|
50
|
-
text_format?: number;
|
|
51
|
-
enable_semantic_sentence_detection?: boolean;
|
|
52
|
-
boost_words?: Array<{
|
|
53
|
-
word: string;
|
|
54
|
-
weight: number;
|
|
55
|
-
}>;
|
|
56
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
57
|
-
export declare function lasAudioExtractAndSplit(params: {
|
|
58
|
-
input_path: string;
|
|
59
|
-
output_path_template: string;
|
|
60
|
-
split_duration?: number;
|
|
61
|
-
output_format?: string;
|
|
62
|
-
timeout?: number;
|
|
63
|
-
extra_params?: string[];
|
|
64
|
-
}, config?: ContextLakeConfig): Promise<any>;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lasPdfParseDoubao = lasPdfParseDoubao;
|
|
4
|
-
exports.lasLongVideoUnderstand = lasLongVideoUnderstand;
|
|
5
|
-
exports.lasBareImageTextEmbedding = lasBareImageTextEmbedding;
|
|
6
|
-
exports.lasSeed20 = lasSeed20;
|
|
7
|
-
exports.lasAsrPro = lasAsrPro;
|
|
8
|
-
exports.lasAudioExtractAndSplit = lasAudioExtractAndSplit;
|
|
9
|
-
function getLASConfig(config) {
|
|
10
|
-
// Attempt to get from env vars or config
|
|
11
|
-
const endpoint = process.env.LAS_ENDPOINT || (config?.las)?.endpoint;
|
|
12
|
-
const apiKey = process.env.LAS_API_KEY || (config?.las)?.api_key;
|
|
13
|
-
if (!endpoint || !apiKey) {
|
|
14
|
-
throw new Error("LAS_ENDPOINT and LAS_API_KEY must be set in environment variables or config");
|
|
15
|
-
}
|
|
16
|
-
return { endpoint, apiKey };
|
|
17
|
-
}
|
|
18
|
-
async function lasFetch(path, payload, config) {
|
|
19
|
-
const { endpoint, apiKey } = getLASConfig(config);
|
|
20
|
-
const url = `${endpoint.replace(/\/$/, '')}${path}`;
|
|
21
|
-
const response = await fetch(url, {
|
|
22
|
-
method: 'POST',
|
|
23
|
-
headers: {
|
|
24
|
-
'Content-Type': 'application/json',
|
|
25
|
-
'Authorization': `Bearer ${apiKey}`
|
|
26
|
-
},
|
|
27
|
-
body: JSON.stringify(payload)
|
|
28
|
-
});
|
|
29
|
-
if (!response.ok) {
|
|
30
|
-
let errorText = await response.text().catch(() => '');
|
|
31
|
-
throw new Error(`LAS API Error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
32
|
-
}
|
|
33
|
-
return await response.json();
|
|
34
|
-
}
|
|
35
|
-
async function lasPdfParseDoubao(params, config) {
|
|
36
|
-
return lasFetch('/api/v1/submit', {
|
|
37
|
-
operator_id: 'las_pdf_parse_doubao',
|
|
38
|
-
operator_version: 'v1',
|
|
39
|
-
data: params
|
|
40
|
-
}, config);
|
|
41
|
-
}
|
|
42
|
-
async function lasLongVideoUnderstand(params, config) {
|
|
43
|
-
return lasFetch('/api/v1/submit', {
|
|
44
|
-
operator_id: 'las_long_video_understand',
|
|
45
|
-
operator_version: 'v1',
|
|
46
|
-
data: params
|
|
47
|
-
}, config);
|
|
48
|
-
}
|
|
49
|
-
async function lasBareImageTextEmbedding(params, config) {
|
|
50
|
-
return lasFetch('/api/v1/embeddings/multimodal', {
|
|
51
|
-
model: 'doubao-embedding-vision',
|
|
52
|
-
input: params.input,
|
|
53
|
-
encoding_format: params.encoding_format
|
|
54
|
-
}, config);
|
|
55
|
-
}
|
|
56
|
-
async function lasSeed20(params, config) {
|
|
57
|
-
return lasFetch('/api/v1/chat/completions', params, config);
|
|
58
|
-
}
|
|
59
|
-
async function lasAsrPro(params, config) {
|
|
60
|
-
return lasFetch('/api/v1/submit', {
|
|
61
|
-
operator_id: 'las_asr_pro',
|
|
62
|
-
operator_version: 'v1',
|
|
63
|
-
data: params
|
|
64
|
-
}, config);
|
|
65
|
-
}
|
|
66
|
-
async function lasAudioExtractAndSplit(params, config) {
|
|
67
|
-
return lasFetch('/api/v1/process', {
|
|
68
|
-
operator_id: 'las_audio_extract_and_split',
|
|
69
|
-
operator_version: 'v1',
|
|
70
|
-
data: params
|
|
71
|
-
}, config);
|
|
72
|
-
}
|