-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28907de
commit 29bed6b
Showing
16 changed files
with
818 additions
and
13 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
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
36 changes: 36 additions & 0 deletions
36
integ-tests/baml_src/test-files/functions/output/type-aliases.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,36 @@ | ||
type Primitive = int | string | bool | float | ||
|
||
type List = string[] | ||
|
||
type Graph = map<string, string[]> | ||
|
||
type Combination = Primitive | List | Graph | ||
|
||
function PrimitiveAlias(p: Primitive) -> Primitive { | ||
client "openai/gpt-4o" | ||
prompt r#" | ||
Return the given value back: {{ p }} | ||
"# | ||
} | ||
|
||
function MapAlias(m: Graph) -> Graph { | ||
client "openai/gpt-4o" | ||
prompt r#" | ||
Return the given Graph back: | ||
|
||
{{ m }} | ||
|
||
{{ ctx.output_format }} | ||
"# | ||
} | ||
|
||
function NestedAlias(c: Combination) -> Combination { | ||
client "openai/gpt-4o" | ||
prompt r#" | ||
Return the given value back: | ||
|
||
{{ c }} | ||
|
||
{{ ctx.output_format }} | ||
"# | ||
} |
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
Oops, something went wrong.