|
1 | | -# YourFunctionName |
2 | | -*Brief description of what this evaluation function does, from the developer perspective* |
| 1 | +# eduVision |
| 2 | +Handle all API calls to external services. |
| 3 | + |
| 4 | +For now, we have examples and API structure prepare for the EduVision Proof of Concept Application. |
3 | 5 |
|
4 | 6 | ## Inputs |
5 | | -*Specific input parameters which can be supplied when the `eval` command is supplied to this function.* |
| 7 | + |
| 8 | +- `response` (Any): The answers provided by the student. It can be a ID of the instance, a list of IDs, a list of dictionaries, etc. to handle the response from the API. |
| 9 | +- `answer` (Any): The correct answers to compare against the API response. |
| 10 | +- `params` (Dict): Important endpoint information to make the API call to EduVision API Server. Storing ````endpoint``` information. |
| 11 | + |
| 12 | +``` |
| 13 | +{server}/{endpoint}{response} |
| 14 | +``` |
6 | 15 |
|
7 | 16 | ## Outputs |
8 | | -*Output schema/values for this function* |
| 17 | +Return result value is a boolean. |
| 18 | + |
| 19 | +```python |
| 20 | + { |
| 21 | + "is_correct": true |
| 22 | + } |
| 23 | +``` |
9 | 24 |
|
10 | 25 | ## Examples |
11 | | -*List of example inputs and outputs for this function, each under a different sub-heading* |
| 26 | +For now, we have examples for the EduVision Proof of Concept Application. |
12 | 27 |
|
13 | | -### Simple Evaluation |
| 28 | +### EduVision Application |
| 29 | + |
| 30 | +There is 2 endpoints to call the API. The first one is to get the list of all the students and the second one is to get the list of all the courses. |
| 31 | + |
| 32 | +#### Resistors |
| 33 | +Check how many resistors is recognized with its resistance value. |
| 34 | +***Answer value must be dictionary.*** |
| 35 | + |
| 36 | +```python |
| 37 | +{ |
| 38 | + "headers": { |
| 39 | + "command": "eval" |
| 40 | + }, |
| 41 | + "body": { |
| 42 | + "response": "999999", |
| 43 | + "answer": [], |
| 44 | + "params": { |
| 45 | + "api_endpoint": "endpoint/" |
| 46 | + } |
| 47 | + } |
| 48 | +} |
| 49 | +``` |
14 | 50 |
|
15 | 51 | ```python |
16 | 52 | { |
17 | | - "example": { |
18 | | - "Something": "something" |
| 53 | + "headers": { |
| 54 | + "command": "eval" |
| 55 | + }, |
| 56 | + "body": { |
| 57 | + "response": "999999", |
| 58 | + "answer": [ |
| 59 | + { |
| 60 | + "resistance": 1000.0, |
| 61 | + }, |
| 62 | + { |
| 63 | + "resistance": 1000.0, |
| 64 | + }, |
| 65 | + ], |
| 66 | + "params": { |
| 67 | + "api_endpoint": "endpoint/" |
| 68 | + } |
19 | 69 | } |
20 | 70 | } |
21 | 71 | ``` |
| 72 | +#### Resistance |
| 73 | +Check global resistance of the circuit |
| 74 | +***Answer value must be float.*** |
22 | 75 |
|
23 | 76 | ```python |
24 | 77 | { |
25 | | - "example": { |
26 | | - "Something": "something" |
| 78 | + "headers": { |
| 79 | + "command": "eval" |
| 80 | + }, |
| 81 | + "body": { |
| 82 | + "response": "999999", |
| 83 | + "answer": 1000.0, |
| 84 | + "params": { |
| 85 | + "api_endpoint": "endpoint/" |
| 86 | + } |
27 | 87 | } |
28 | 88 | } |
29 | 89 | ``` |
0 commit comments