Skip to content

Commit

Permalink
update python example readme, workspace, launch config (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrabach authored Aug 23, 2024
1 parent 78a2702 commit 095c623
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 39 deletions.
37 changes: 1 addition & 36 deletions examples/python-example01/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "semantic-workbench-app",
"cwd": "${workspaceFolder}/../../semantic-workbench/v1/app",
"skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"]
},
{
"type": "debugpy",
"request": "launch",
"name": "semantic-workbench-service",
"cwd": "${workspaceFolder}/../../semantic-workbench/v1/service",
"module": "semantic_workbench_service.start",
"justMyCode": false,
"consoleTitle": "semantic-workbench-service",
"args": ["--host", "0.0.0.0", "--port", "3000"]
},
{
"type": "debugpy",
"request": "launch",
"name": "python-example01 (assistant)",
"cwd": "${workspaceFolder}",
"module": "semantic_workbench_assistant.start",
"args": ["assistant.chat:app", "--port", "3003"],
"consoleTitle": "${workspaceFolderBasename}",
"envFile": "${workspaceFolder}/.env"
}
],
"compounds": [
{
"name": "semantic-workbench",
"configurations": ["semantic-workbench-app", "semantic-workbench-service"]
},
{
"name": "example assistant and semantic-workbench",
"configurations": [
"semantic-workbench-app",
"semantic-workbench-service",
"python-example01 (assistant)"
]
"consoleTitle": "${workspaceFolderBasename}"
}
]
}
7 changes: 4 additions & 3 deletions examples/python-example01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ A python chat assistant example that echos the user's input.
- ALTERNATIVE: Local setup following the [main README](../../README.md#quick-start---local-development-environment)
- Set up and verify that the workbench app and service are running
- Stop the services and open the [python-examples01.code-workspace](./python-examples01.code-workspace) in VS Code
- You should always stop the services before switching workspaces, otherwise the services will not be able to start in the new workspace

## Steps

- Use VS Code > Run and Debug > `example assistant and semantic-workbench` to start the assistant.
- Use VS Code > `Run and Debug` (ctrl/cmd+shift+d) > `semantic-workbench` to start the app and service from this workspace
- Use VS Code > `Run and Debug` (ctrl/cmd+shift+d) > `python-example01` to start the assistant.
- If running in a devcontainer, follow the instructions in [GitHub Codespaces / devcontainer README](../../.devcontainer/README.md#start-the-app-and-service) for any additional steps.
- Return to the workbench app to interact with the assistant
- Add a new assistant from the main menu of the app, choose `Python Example 01 Assistant`
Expand Down Expand Up @@ -39,6 +41,5 @@ Copy the contents of this folder to your project.

## Suggested Development Environment

- Use GitHub Codespaces for a quick, turn-key dev environment: [/.devcontainer/README.md](../../../.devcontainer/README.md)
- Use GitHub Codespaces for a quick, turn-key dev environment: [/.devcontainer/README.md](../../.devcontainer/README.md)
- VS Code is recommended for development
-
3 changes: 3 additions & 0 deletions examples/python-example01/python-examples01.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{
"path": ".",
"name": "examples/python-examples01"
},
{
"path": "../../"
}
]
}

0 comments on commit 095c623

Please sign in to comment.