Skip to content

Commit 115883d

Browse files
committed
add example and explaination
1 parent ae58639 commit 115883d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+357
-43
lines changed

Diff for: docs/api/docutils/pdf_to_text.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: pdf_to_text.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

Diff for: docs/api/fs/createFile.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,23 @@ data:
2525
link: createFile.md
2626
---
2727
<CBBaseInfo/>
28-
<CBParameters/>
28+
<CBParameters/>
29+
30+
### Example
31+
32+
```js
33+
// Let's assume you want to create a text file named hello.txt in the /home/user/documents directory with the content "Hello, world!"
34+
35+
codebolt.fs.createFile('hello.txt', 'Hello, world!', '/home/user/documents');
36+
37+
```
38+
39+
### Explaination
40+
41+
The codebolt.fs.createFile method is used to create a new file in a specified directory, with content provided as a string. It has three parameters:
42+
43+
fileName (string): This parameter specifies the name of the file to be created. The name should include the file extension (e.g., "example.txt", "data.json").
44+
45+
source (string): This parameter contains the content that will be written into the newly created file. It can be any string data that you want to save in the file.
46+
47+
filePath (string): This parameter defines the path where the file will be created. It should be a valid path in the filesystem where you have write permissions.

Diff for: docs/api/fs/createFolder.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: createFolder.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
31+
//Let's assume you want to create a folder named newFolder in the /home/user/documents directory.
32+
33+
codebolt.fs.createFolder('newFolder', '/home/user/documents');
34+
35+
```
36+
37+
### Explaination
38+
39+
The codebolt.fs.createFolder method is used to create a new folder in a specified directory. It has two parameters:
40+
41+
folderName (string): The name of the folder to be created.
42+
43+
folderPath (string): The path where the folder will be created.

Diff for: docs/api/fs/deleteFile.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ data:
2222
link: deleteFile.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
The codebolt.fs.deleteFile method is used to delete a specified file from a given directory. It has two parameters:
30+
31+
filename (string): The name of the file to be deleted, including the file extension (e.g., "example.txt", "data.json").
32+
33+
filePath (string): The path to the directory where the file is located.

Diff for: docs/api/fs/deleteFolder.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: deleteFolder.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
//Let's assume you want to delete a folder named oldFolder in the /home/user/documents directory.
31+
32+
codebolt.fs.deleteFolder('oldFolder', '/home/user/documents');
33+
34+
```
35+
36+
37+
### Explaination
38+
39+
The codebolt.fs.deleteFolder method is used to delete a specified folder from a given directory. It has two parameters:
40+
41+
foldername (string): The name of the folder to be deleted.
42+
43+
folderpath (string): The path to the directory where the folder is located.

Diff for: docs/api/fs/listFile.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ data:
1717
link: listFile.md
1818
---
1919
<CBBaseInfo/>
20-
<CBParameters/>
20+
<CBParameters/>
21+
22+
### Status
23+
24+
Working Progress...

Diff for: docs/api/fs/readFile.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,22 @@ data:
2222
link: readFile.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Example
28+
29+
```js
30+
31+
// Let's assume you want to read the content of a file named example.txt in the /home/user/documents directory.
32+
33+
codebolt.fs.readFile('example.txt', '/home/user/documents');
34+
35+
```
36+
37+
### Explaination
38+
39+
The codebolt.fs.readFile method is used to read the content of a specified file from a given directory. It has two parameters:
40+
41+
filename (string): The name of the file to be read, including the file extension (e.g., "example.txt", "data.json").
42+
43+
filePath (string): The path to the directory where the file is located. It should be a valid path in the filesystem where you have read permissions.

Diff for: docs/api/fs/updateFile.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ data:
2525
link: updateFile.md
2626
---
2727
<CBBaseInfo/>
28-
<CBParameters/>
28+
<CBParameters/>
29+
30+
### Status
31+
32+
Working Progress...

Diff for: docs/api/git/add.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: add.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

Diff for: docs/api/git/branch.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ data:
2222
link: branch.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Status
28+
29+
Working Progress...

Diff for: docs/api/git/checkout.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ data:
2222
link: checkout.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Status
28+
29+
Working Progress...

Diff for: docs/api/git/clone.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ data:
2222
link: clone.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Status
28+
29+
Working Progress...

Diff for: docs/api/git/commit.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,18 @@ data:
2121
link: commit.md
2222
---
2323
<CBBaseInfo/>
24-
<CBParameters/>
24+
<CBParameters/>
25+
26+
### Example
27+
28+
```js
29+
30+
const commitMessage = await codebolt.git.commit('test');
31+
32+
```
33+
34+
35+
36+
### Explaination
37+
38+
To use the codebolt.git.commit method properly, you need to understand how to make a commit in a Git repository using this method. The codebolt.git.commit function is likely used to commit changes in a Git repository with a specified commit message.

Diff for: docs/api/git/diff.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ data:
2222
link: diff.md
2323
---
2424
<CBBaseInfo/>
25-
<CBParameters/>
25+
<CBParameters/>
26+
27+
### Status
28+
29+
Working Progress...

Diff for: docs/api/git/init.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ data:
1919
link: init.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
25+
### Status
26+
27+
Work Progress...

Diff for: docs/api/git/logs.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: logs.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Work Progress...

Diff for: docs/api/git/pull.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ data:
2121
link: pull.md
2222
---
2323
<CBBaseInfo/>
24-
<CBParameters/>
24+
<CBParameters/>
25+
26+
### Status
27+
28+
Work Progress...

Diff for: docs/api/git/push.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: push.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Work Progress...

Diff for: docs/api/git/status.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: status.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Work Progress...

Diff for: docs/api/llm/inference.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,26 @@ data:
2424
link: inference.md
2525
---
2626
<CBBaseInfo/>
27-
<CBParameters/>
27+
<CBParameters/>
28+
29+
### Example
30+
31+
```js
32+
33+
const question = "Write an API to get all users from the User Table.";
34+
const llmRole = "assistant";
35+
36+
const response = codebolt.llm.inference(question, llmRole);
37+
console.log(response);
38+
39+
40+
```
41+
42+
43+
### Explaination
44+
45+
The codebolt.llm.inference function allows you to send an inference request to a Large Language Model (LLM) and retrieves the model's response. It has two parameter:
46+
47+
question (string): This parameter represents the input question or prompt you want to send to the LLM for inference.
48+
49+
llmRole (string): This parameter specifies the role or type of Large Language Model (LLM) you want to use for inference. The role determines which variant of the LLM is selected for processing the input question and generating the response.

Diff for: docs/api/outputparsers/init.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: init.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

Diff for: docs/api/outputparsers/parseErrors.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ data:
1616
link: parseErrors.md
1717
---
1818
<CBBaseInfo/>
19-
<CBParameters/>
19+
<CBParameters/>
20+
21+
### Status
22+
23+
Working Progress...

Diff for: docs/api/outputparsers/parseWarnings.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ data:
1616
link: parseWarnings.md
1717
---
1818
<CBBaseInfo/>
19-
<CBParameters/>
19+
<CBParameters/>
20+
21+
### Status
22+
23+
Working Progress...

Diff for: docs/api/project/getProjectPath.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,16 @@ data:
1616
link: getProjectPath.md
1717
---
1818
<CBBaseInfo/>
19-
<CBParameters/>
19+
<CBParameters/>
20+
21+
22+
### Example
23+
24+
```js
25+
26+
const getpath = await codebolt.project.getProjectPath();
27+
28+
```
29+
### Explaination
30+
31+
The codebolt.project.getProjectPath() function is likely used to retrieve the path of the current project.

Diff for: docs/api/project/getProjectSettings.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ data:
1919
link: getProjectSettings.md
2020
---
2121
<CBBaseInfo/>
22-
<CBParameters/>
22+
<CBParameters/>
23+
24+
### Status
25+
26+
Working Progress...

0 commit comments

Comments
 (0)