Skip to content

Commit 52be49d

Browse files
committed
update readme with mued
1 parent 694288d commit 52be49d

1 file changed

Lines changed: 96 additions & 12 deletions

File tree

README.md

Lines changed: 96 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ You agent can be based on an LLM hosted anywhere, you have available currently O
106106
└── tests/ # contains all tests for the chat function
107107
├── manual_agent_requests.py # allows testing of the docker container through API requests
108108
├── manual_agent_run.py # allows testing of any LLM agent on a couple of example inputs
109+
├── test_example_inputs.py # pytests for the example input files
109110
├── test_index.py # pytests
110111
└── test_module.py # pytests
111112
```
@@ -165,7 +166,7 @@ This will start the chat function and expose it on port `8080` and it will be op
165166
```bash
166167
curl --location 'http://localhost:8080/2015-03-31/functions/function/invocations' \
167168
--header 'Content-Type: application/json' \
168-
--data '{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\",
169+
--data '{"body":"{\"conversationId\": \"12345Test\", \"messages\": [{\"role\": \"USER\", \"content\": \"hi\"}], \"user\": {\"type\": \"LEARNER\"}}"}'
169170
```
170171

171172
#### Call Docker Container
@@ -184,21 +185,104 @@ http://localhost:8080/2015-03-31/functions/function/invocations
184185
Body (stringified within body for API request):
185186

186187
```JSON
187-
{"body":"{\"message\": \"hi\", \"params\": {\"conversation_id\": \"12345Test\", \"conversation_history\": [{\"type\": \"user\", \"content\": \"hi\"}]}}"}
188+
{"body":"{\"conversationId\": \"12345Test\", \"messages\": [{\"role\": \"USER\", \"content\": \"hi\"}], \"user\": {\"type\": \"LEARNER\"}}"}
188189
```
189190

190-
Body with optional Params:
191-
```JSON
191+
Body with optional fields:
192+
```json
192193
{
193-
"message":"hi",
194-
"params":{
195-
"conversation_id":"12345Test",
196-
"conversation_history":[{"type":"user","content":"hi"}],
197-
"summary":" ",
198-
"conversational_style":" ",
199-
"question_response_details": "",
200-
"include_test_data": true,
194+
"conversationId": "<uuid>",
195+
"messages": [
196+
{ "role": "USER", "content": "<previous user message>" },
197+
{ "role": "ASSISTANT", "content": "<previous assistant reply>" },
198+
{ "role": "USER", "content": "<current message>" }
199+
],
200+
"user": {
201+
"userId": "<uid>",
202+
"type": "LEARNER",
203+
"preference": {
204+
"conversationalStyle": "<stored style string>"
205+
},
206+
"taskProgress": {
207+
"currentQuestionId": "<question uuid>",
208+
"timeSpentOnQuestion": "30 minutes",
209+
"accessStatus": "a good amount of time spent on this question today.",
210+
"markedDone": "This question is still being worked on.",
211+
"currentPart": {
212+
"partId": "<part uuid>",
213+
"position": 0,
214+
"timeSpentOnPart": "10 minutes",
215+
"markedDone": "This part is not marked done.",
216+
"responseAreas": [
217+
{
218+
"responseAreaId": "<response area uuid>",
219+
"responseType": "EXPRESSION",
220+
"totalSubmissions": 3,
221+
"wrongSubmissions": 2,
222+
"latestSubmission": {
223+
"submission": "<student's last answer>",
224+
"feedback": "<feedback text from evaluator>",
225+
"answer": "<reference answer used for evaluation>"
226+
}
227+
}
228+
]
229+
}
230+
}
231+
},
232+
"context": {
233+
"summary": "<compressed conversation history>",
234+
"set": {
235+
"title": "Fundamentals",
236+
"number": 2,
237+
"description": "<set description>"
238+
},
239+
"question": {
240+
"title": "Understanding Polymorphism",
241+
"number": 3,
242+
"guidance": "<teacher guidance>",
243+
"content": "<master question content>",
244+
"estimatedTime": "15-25 minutes",
245+
"parts": [
246+
{
247+
"partId": "<part uuid>",
248+
"position": 0,
249+
"content": "<part prompt>",
250+
"answerContent": "<part answer>",
251+
"workedSolutionSections": [
252+
{ "id": "<uuid>", "position": 0, "title": "Step 1", "content": "..." }
253+
],
254+
"structuredTutorialSections": [
255+
{ "id": "<uuid>", "position": 0, "title": "Hint", "content": "..." }
256+
],
257+
"responseAreas": [
258+
{
259+
"responseAreaId": "<response area uuid>",
260+
"position": 0,
261+
"responseType": "EXPRESSION",
262+
"answer": "<reference answer>",
263+
"preResponseText": "<label shown before input>"
264+
}
265+
]
266+
}
267+
]
201268
}
269+
}
270+
}
271+
```
272+
273+
Response:
274+
275+
```json
276+
{
277+
"output": {
278+
"role": "ASSISTANT",
279+
"content": "<assistant reply text>"
280+
},
281+
"metadata": {
282+
"summary": "<updated conversation summary>",
283+
"conversationalStyle": "<updated style string>",
284+
"processingTimeMs": 1234
285+
}
202286
}
203287
```
204288

0 commit comments

Comments
 (0)