Skip to content

Commit

Permalink
openai api key
Browse files Browse the repository at this point in the history
  • Loading branch information
rgstephens committed Nov 29, 2024
1 parent 6d861d1 commit 7d4c067
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ jobs:
| `workspace` | The root directory containing your Rasa Open Source project | `${{ github.workspace }}` |
| `train_type` | The types of training (available types: `core`/`nlu`/`all`) | `all` |
| `train_args` | Additional arguments passed to the `rasa train` command | `none` |
| `test_type` | The types of tests to run (available types: `core`/`nlu`/`all`) | `all` |
| `test_type` | The types of tests to run (available types: `core`/`nlu`/`all`/`none`) | `all` |
| `test_nlu_args` | Additional arguments passed to the `rasa test nlu` command | `none` |
| `test_core_args` | Additional arguments passed to the `rasa test core` command | `none` |
| `publish_summary` | Publish tests summary as a PR comment | `true` |
| `github_token` | GitHub Token - required to add a comment with summary | `none` |
| `rasa_pro_license` | Rasa Pro License - set RASA_PRO_LICENSE environment from secrets | `none` |
| `openai_api_key` | OpenAI API Key - set OPENAI_API_KEY environment from secrets | `none` |
| `configuration` | Model configuration file | `config.yml` |
| `model` | Path to a file with a model. Use existing model instead of training a new one | `none` |
| `cross_validation` | Switch on cross validation mode. Any provided model will be ignored | `false` |
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ inputs:
description: 'Rasa Pro License - set RASA_PRO_LICENSE environment'
required: false
default: ''
openai_api_key:
description: 'OPENAI_API_KEY'
required: false
default: ''
configuration:
description: 'Model configuration file'
required: true
Expand Down Expand Up @@ -153,6 +157,9 @@ runs:
core)
echo TEST_CORE="true" >> $GITHUB_ENV
;;
none)
echo "No tests will be run"
;;
*)
echo "::error::Unknown test type: ${{ inputs.test_type }} (use: core/nlu/all)"
exit 1
Expand All @@ -172,6 +179,7 @@ runs:
echo DOCKER_ARGS="--rm --tmpfs ${{ inputs.tmpfs_directory }} -e HOME=/app -e MPLCONFIGDIR=/tmp/.mplconfigdir \
-e CI=${CI} -e RASA_TELEMETRY_ENABLED=${{ env.RASA_TELEMETRY_ENABLED }} -v ${{ github.workspace }}:/app/github_workspace \
-e RASA_PRO_LICENSE=${{ inputs.RASA_PRO_LICENSE }} \
-e OPENAI_API_KEY=${{ inputs.OPENAI_API_KEY }} \
-v ${{ inputs.workspace }}:/app -v ${{ inputs.workspace }}/models:/app/models \
-v ${{ inputs.workspace }}/${{ inputs.result_directory }}:/app/results" >> $GITHUB_ENV
Expand Down

0 comments on commit 7d4c067

Please sign in to comment.