File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 66
66
# The full version, including alpha/beta/rc tags.
67
67
release = __version__
68
68
69
+ # Variables (formatted as `|variable|`) to be replaced in the text
70
+ # Sphinx replaces `|release|` and `|version|` by default,
71
+ # but we have to add an `rst_epilog` to replace our own variables
72
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
73
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_epilog
74
+ from rasa_sdk import __version__ as rasa_sdk_version
75
+
76
+ # type : Dict[Text, Text]
77
+ variables_to_replace = {"rasa_sdk_version" : rasa_sdk_version }
78
+
79
+ rst_epilog = ""
80
+ for name , value in variables_to_replace .items ():
81
+ rst_epilog += f".. |{ name } | replace:: { value } \n "
82
+
83
+
69
84
# The language for content autogenerated by Sphinx. Refer to documentation
70
85
# for a list of supported languages.
71
86
#
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ You can then run the actions with the following command:
222
222
223
223
.. parsed-literal ::
224
224
225
- docker run -d -v $(pwd)/actions:/app/actions --net my-project --name action-server rasa/rasa-sdk:\ |version |.0
225
+ docker run -d -v $(pwd)/actions:/app/actions --net my-project --name action-server rasa/rasa-sdk:\ |rasa_sdk_version |
226
226
227
227
228
228
Here's what's happening in that command:
@@ -232,7 +232,7 @@ Here's what's happening in that command:
232
232
container so that the action server can run the code in the ``actions `` folder
233
233
- ``net my-project ``: Run the server on a specific network so that the rasa container can find it
234
234
- ``--name action-server ``: Gives the server a specific name for the rasa server to reference
235
- - rasa/rasa-sdk:|version |.0 : Uses the Rasa SDK image with the tag |version |.0
235
+ - rasa/rasa-sdk:|rasa_sdk_version | : Uses the Rasa SDK image with the tag |rasa_sdk_version |
236
236
237
237
238
238
Because the action server is running in detached mode, if you want to stop the container,
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ To create your image:
128
128
.. parsed-literal ::
129
129
130
130
# Extend the official Rasa SDK image
131
- FROM rasa/rasa-sdk:\ | version |.0
131
+ FROM rasa/rasa-sdk:| rasa_sdk_version |
132
132
133
133
# Use subdirectory as working directory
134
134
WORKDIR /app
You can’t perform that action at this time.
0 commit comments