Skip to content

Commit b72c8cd

Browse files
authored
Update protobuf definitions for remote list_append fix (#937)
Fixes #920 The issue is that the `list_append` feature in `gen` does not work with remote models. The primary fix here was to update protobuf definitions to support lists inside the captured values.
1 parent 44af848 commit b72c8cd

File tree

5 files changed

+474
-42
lines changed

5 files changed

+474
-42
lines changed

guidance/_serialization.proto

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,24 @@ message EngineCallResponse {
1010
bytes new_bytes = 1;
1111
bool is_generated = 2;
1212
float new_bytes_prob = 3;
13-
map<string, string> capture_groups = 4;
14-
map<string, float> capture_group_log_probs = 5;
13+
map<string, Value> capture_groups = 4;
14+
map<string, Value> capture_group_log_probs = 5;
1515
int32 new_token_count = 6;
1616
}
1717

18+
message Value {
19+
oneof kind {
20+
string string_value = 1;
21+
bytes bytes_value = 2;
22+
float float_value = 3;
23+
ListValue list_value = 4;
24+
}
25+
}
26+
27+
message ListValue {
28+
repeated Value values = 1;
29+
}
30+
1831
message Byte {
1932
bytes byte = 1;
2033
bool hidden = 2;

guidance/_serialization_pb2.py

Lines changed: 47 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)