mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
docs: make_your_own.md formatting fix for mkdocs (#855)
This commit is contained in:
parent
d672ac690d
commit
3574d0b823
1 changed files with 6 additions and 4 deletions
|
@ -177,6 +177,7 @@ If your Tool class requires more advanced initialization, you would add it to th
|
||||||
The default initialization can be seen in the `loadToolWithAuth` function, and most custom plugins should be initialized this way.
|
The default initialization can be seen in the `loadToolWithAuth` function, and most custom plugins should be initialized this way.
|
||||||
|
|
||||||
Here are a few customConstructors, which have varying initializations
|
Here are a few customConstructors, which have varying initializations
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const customConstructors = {
|
const customConstructors = {
|
||||||
browser: async () => {
|
browser: async () => {
|
||||||
|
@ -196,7 +197,7 @@ Here are a few customConstructors, which have varying initializations
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 6: Export your Plugin into index.js
|
## Step 6: Export your Plugin into index.js
|
||||||
|
|
||||||
|
@ -240,7 +241,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
Each of the fields of the "plugin" object are important. Follow this format strictly. If your plugin requires authentication, you will add those details under `authConfig` as an array since there could be multiple authentication variables. See the Calculator plugin for an example of one that doesn't require authentication, where the authConfig is an empty array (an array is always required).
|
Each of the fields of the "plugin" object are important. Follow this format strictly. If your plugin requires authentication, you will add those details under `authConfig` as an array since there could be multiple authentication variables. See the Calculator plugin for an example of one that doesn't require authentication, where the authConfig is an empty array (an array is always required).
|
||||||
|
|
||||||
|
@ -248,7 +249,8 @@ module.exports = {
|
||||||
**Note:** the `authField` prop must match the process.env variable name
|
**Note:** the `authField` prop must match the process.env variable name
|
||||||
|
|
||||||
Here is an example of a plugin with more than one credential variable
|
Here is an example of a plugin with more than one credential variable
|
||||||
```json
|
|
||||||
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "Google",
|
"name": "Google",
|
||||||
|
@ -268,7 +270,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example: WolframAlphaAPI Tool
|
## Example: WolframAlphaAPI Tool
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue