Skip to content

Commit

Permalink
migrate to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
icebaker committed Jun 4, 2023
1 parent 789a798 commit 36c3197
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Once you have access to the Nano Bots API, you can navigate to "File" -> "Prefer

- `NANO_BOTS_API_ADDRESS`: `http://localhost:3048`
- `NANO_BOTS_STREAM`: `true`
- `NANO_BOTS_USER_IDENTIFIER`: `anonymous` (`your-name`)
- `NANO_BOTS_END_USER`: `anonymous` (`your-name`)

![settings](https://user-images.githubusercontent.com/113217272/239404558-aacd4efa-1657-4516-baeb-d0c564c7fcb2.png)

Expand Down Expand Up @@ -129,19 +129,21 @@ You can override the default cartridge by creating your own with the name `defau
```yaml
---
meta:
name: Default
symbol: 🤖
name: Default
author: Your Name
version: 0.0.1
version: 1.0.0
license: CC0-1.0
description: A helpful assistant.

provider:
name: openai
id: openai
credentials:
address: ENV/OPENAI_API_ADDRESS
access-token: ENV/OPENAI_API_KEY
settings:
user: ENV/NANO_BOTS_END_USER
model: gpt-3.5-turbo
credentials:
address: ENV/OPENAI_API_ADDRESS
access-token: ENV/OPENAI_API_ACCESS_TOKEN
user-identifier: ENV/OPENAI_API_USER_IDENTIFIER
```
## Shortcuts
Expand Down
2 changes: 1 addition & 1 deletion nanobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class NanoBot {
timeout: timeout,
headers: {
'Content-Type': 'application/json',
NANO_BOTS_USER_IDENTIFIER: 'vscode/' + config.NANO_BOTS_USER_IDENTIFIER
NANO_BOTS_END_USER: 'vscode-' + config.NANO_BOTS_END_USER
}
};

Expand Down
2 changes: 1 addition & 1 deletion nanobot_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NanoBotHelpers {
return {
NANO_BOTS_API_ADDRESS: config.get('NANO_BOTS_API_ADDRESS'),
NANO_BOTS_STREAM: config.get('NANO_BOTS_STREAM'),
NANO_BOTS_USER_IDENTIFIER: config.get('NANO_BOTS_USER_IDENTIFIER')
NANO_BOTS_END_USER: config.get('NANO_BOTS_END_USER')
};
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"default": "https://api.nbots.io",
"description": "Set the address for the Nano Bots API."
},
"🤖 Nano Bots.NANO_BOTS_USER_IDENTIFIER": {
"🤖 Nano Bots.NANO_BOTS_END_USER": {
"type": "string",
"default": "anonymous",
"description": "Your custom user identifier (user-name)."
Expand Down

0 comments on commit 36c3197

Please sign in to comment.