-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
56 lines (49 loc) · 1.2 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Model } from "@ai-sdk/openai";
export type Options = {
/**
* The path to the file to update.
* @default "./README.md"
*/
readonly filePath?: string;
/**
* The start marker of the diagram in the file.
* @default "<!-- MERMAID_DIAGRAM_START -->"
*/
readonly startMarker?: string;
/**
* The end marker of the diagram in the file.
* @default "<!-- MERMAID_DIAGRAM_END -->"
*/
readonly endMarker?: string;
/**
* The system prompt for the LLM.
*/
readonly systemPrompt?: string;
/**
* The LLM model to use.
* @default openai("gpt-4o")
*/
readonly model?: Model;
/**
* The JSON schema of the tools.
*/
readonly jsonSchema: object;
};
/**
* Generate a mermaid diagram from a JSON schema of tools.
*
* @param options - The options for the diagram generation.
* @returns A promise that resolves when the diagram is successfully updated.
*
* @example
* ```javascript
* import jsonSchemaToDiagram from 'json-schema-to-diagram';
*
* const options = {
* jsonSchema: { /* your JSON schema here *\/ },
* };
*
* await jsonSchemaToDiagram(options);
* ```
*/
export default function jsonSchemaToDiagram(options: Options): Promise<void>;