Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit c769bfd

Browse files
committed
Update deserialize_gpt doc comment
1 parent 9be4d08 commit c769bfd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

server/bleep/src/webserver/answer.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,9 +1332,18 @@ enum Action {
13321332
impl Action {
13331333
/// Deserialize this action from the GPT-tagged enum variant format.
13341334
///
1335+
/// We convert (2 examples):
1336+
///
1337+
/// ```text
1338+
/// {"name": "Variant1", "args": {}}
1339+
/// {"name": "Variant2", "args": {"a":123}}
1340+
/// ```
1341+
///
1342+
/// To:
1343+
///
13351344
/// ```text
1336-
/// {"type":"value"}
1337-
/// {"type":["arg1", "arg2"]}
1345+
/// {"Variant1": {}}
1346+
/// {"Variant2": {"a":123}}
13381347
/// ```
13391348
///
13401349
/// So that we can deserialize using the serde-provided "tagged" enum representation.

0 commit comments

Comments
 (0)