Skip to content

Commit 5198b81

Browse files
authored
Merge pull request #9 from lambda-feedback/docs/readme-update
Updated Curl example
2 parents 6f97723 + 0a438f8 commit 5198b81

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,39 @@ To build the Docker image, run the following command:
129129
docker build -t my-wolfram-evaluation-function .
130130
```
131131

132+
### Running the Docker Image
133+
To run the Docker image, you will need to mount a mathpass licence or pass an entitlement ID. To get these see [Licencing](#Wolfram-Engine-License
134+
).
135+
136+
To run using mathpass development licence (this assumes that the mathpass file is in your local working directory:
137+
```bash
138+
docker run -it --rm -v $(pwd)/mathpass:/home/wolframengine/.WolframEngine/Licensing/mathpass wolfram-evaluation-function
139+
```
140+
141+
To run using the entitlement key:
142+
```bash
143+
docker run -it --rm -env WOLFRAMSCRIPT_ENTITLEMENTID=[YOUR_ENTITLEMENT_ID] wolfram-evaluation-function
144+
```
145+
146+
### Sending requests to the image
147+
We recommend sending requests to your image using [Postman](https://www.postman.com/), an easy to use interface for sending API requests.
148+
149+
If you prefer to use `curl` here is an example request:
150+
```bash
151+
curl --location 'http://localhost:8080/wolframEvaluationFunction' \
152+
--header 'Content-Type: application/json' \
153+
--header 'command: eval' \
154+
--data '{
155+
"answer":"Sin[p x + q]",
156+
"response":"Sin[a x + b]",
157+
"params":{
158+
"comparisonType":"structure",
159+
"named_variables":"{x}",
160+
"correct_response_feedback":"Your answer is correct!",
161+
"incorrect_response_feedback":"Your answer is incorrect!"
162+
}
163+
}'
164+
```
132165
## Deployment
133166

134167
This section guides you through the deployment process of the evaluation function. If you want to deploy the evaluation function to Lambda Feedback, follow the steps in the [Lambda Feedback](#deploy-to-lambda-feedback) section. Otherwise, you can deploy the evaluation function to other platforms using the [Other Platforms](#deploy-to-other-platforms) section.

0 commit comments

Comments
 (0)