Skip to content

Commit 1a20cd8

Browse files
committed
updateDocs
1 parent 588c3bf commit 1a20cd8

File tree

7 files changed

+23
-22
lines changed

7 files changed

+23
-22
lines changed

‎docs/gettingStarted/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,16 @@ <h3 id="step-2-configure-your-llm-tools">Step 2: Configure Your LLM Tools</h3>
222222
</code></pre>
223223
<p>Simple enough, huh? Here comes the final step.</p>
224224
<h3 id="step-3-connecting-your-data-to-your-llm">Step 3: Connecting Your Data to Your LLM</h3>
225-
<p>To connect data to your LLM tool, we will need to create a new YAML entry <code>train:</code>. </p>
226-
<p>Here we specify specific the specific data we want to train on. In the case of a CSV, a most simple example, we can use the <code>path</code> value to specify it's location. </p>
225+
<p>To connect data to your LLM tool, we will need to create a new YAML entry <code>train</code>. </p>
226+
<p>Here we set the labels of data we want to train on. In the case of a CSV, a most simple example, we can use the <code>path</code> value to specify it's location. </p>
227227
<p>If the csv has an 'input' and 'output' column, all you need to do is specify the path.</p>
228228
<p>langdrive.yaml </p>
229229
<pre><code>train:
230-
path: ../shared.csv - Default Path for Input and Output
230+
path: ../shared.csv
231231
</code></pre>
232232
<p>But just in case, you can set the columns too. </p>
233233
<pre><code>train:
234-
path: ../shared.csv - Default Path for Input and Output
234+
path: ../shared.csv
235235
inputValue: inputColumnName - Attribute to extract from path
236236
outpuValue: outputColumnName
237237
</code></pre>

‎docs/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ <h2 id="contributing">Contributing</h2>
228228

229229
<!--
230230
MkDocs version : 1.5.3
231-
Build Date UTC : 2023-12-01 20:43:48.448700+00:00
231+
Build Date UTC : 2023-12-01 21:20:58.784322+00:00
232232
-->

‎docs/search/search_index.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎docs/sitemap.xml.gz‎

0 Bytes
Binary file not shown.

‎docs_backup/gettingStarted.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,22 @@ Simple enough, huh? Here comes the final step.
9898

9999
### Step 3: Connecting Your Data to Your LLM
100100

101-
To connect data to your LLM tool, we will need to create a new YAML entry `train:`.
101+
To connect data to your LLM tool, we will need to create a new YAML entry `train`.
102102

103-
Here we specify specific the specific data we want to train on. In the case of a CSV, a most simple example, we can use the `path` value to specify it's location.
103+
Here we set the labels of data we want to train on. In the case of a CSV, a most simple example, we can use the `path` value to specify it's location.
104104

105105
If the csv has an 'input' and 'output' column, all you need to do is specify the path.
106106

107107
langdrive.yaml
108108

109109
train:
110-
path: ../shared.csv - Default Path for Input and Output
110+
path: ../shared.csv
111111

112112

113113
But just in case, you can set the columns too.
114114

115115
train:
116-
path: ../shared.csv - Default Path for Input and Output
116+
path: ../shared.csv
117117
inputValue: inputColumnName - Attribute to extract from path
118118
outpuValue: outputColumnName
119119

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "langdrive",
3-
"version": "1.0.9",
3+
"version": "1.01.00",
44
"description": "",
55
"main": "main.js",
66
"bin": {

‎src/utilsNode.js‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,22 @@ require("dotenv").config();
88
async function cli_train(args) { // console.log(`~~~~ cli_train: ARGS::${''}::\n`, args);
99
let config = getConfig(args); // console.log(`~~~~ cli_train: CONFIG::${''}::\n`, config);
1010
config = mergeCliArgsAndYaml(args, config); // console.log(`~~~~ cli_train: MERGED::${''}:\n`, config);
11+
config = replaceEnvValues(config);
1112
config = await initConfig(config); // console.log(`~~~~ cli_train: INITIALIZED::${''}:\n`, config);
1213
let training = await train(config);
1314
return config
1415
}
1516

17+
function replaceEnvValues(node) {
18+
function getEnvValue(str){return process.env[str.substring(4)] || str}
19+
if (Array.isArray(node)) { return node.map(replaceEnvValues); }
20+
else if (typeof node === 'string') { return getEnvValue(node); }
21+
else if (typeof node === 'object' && node !== null) {
22+
Object.keys(node).forEach((key) => { node[key] = replaceEnvValues(node[key]); });
23+
}
24+
return node;
25+
}
26+
1627
// Retrieves YAML using args.path, default: to langdrive.yaml
1728
// {[...services], train}
1829
function getConfig(args){
@@ -42,17 +53,7 @@ function getConfig(args){
4253
...config.heroku
4354
}
4455
*/
45-
function replaceEnvValues(node) {
46-
function getEnvValue(str){return process.env[str.substring(4)] || str}
47-
if (Array.isArray(node)) { return node.map(replaceEnvValues); }
48-
else if (typeof node === 'string') { return getEnvValue(node); }
49-
else if (typeof node === 'object' && node !== null) {
50-
Object.keys(node).forEach((key) => { node[key] = replaceEnvValues(node[key]); });
51-
}
52-
return node;
53-
}
54-
55-
config = replaceEnvValues(config);
56+
5657
return config
5758
}
5859

0 commit comments

Comments
 (0)