-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding recursive defintions for nested classes (when streaming for pa…
…rtials). (#676) * Added some unit tests in all languages to ensure this continues to work
- Loading branch information
Showing
22 changed files
with
477 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,6 @@ client<llm> Ollama { | |
provider ollama | ||
options { | ||
model llama2 | ||
api_key "" | ||
} | ||
} | ||
|
||
|
33 changes: 33 additions & 0 deletions
33
integ-tests/baml_src/test-files/functions/output/class-nested.baml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class TestClassNested { | ||
prop1 string | ||
prop2 InnerClass | ||
} | ||
|
||
class InnerClass { | ||
prop1 string | ||
prop2 string | ||
inner InnerClass2 | ||
} | ||
|
||
class InnerClass2 { | ||
prop2 int | ||
prop3 float | ||
} | ||
|
||
function FnOutputClassNested(input: string) -> TestClassNested { | ||
client Ollama | ||
prompt #" | ||
Return a made up json blob that matches this schema: | ||
{{ctx.output_format}} | ||
--- | ||
|
||
JSON: | ||
"# | ||
} | ||
|
||
test FnOutputClassNested { | ||
functions [FnOutputClassNested] | ||
args { | ||
input "example input" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.