-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename #545
Merged
rename #545
Changes from 3 commits
Commits
Show all changes
162 commits
Select commit
Hold shift + click to select a range
c6684e6
do legacy pass on grammar
hellovai ef9ebf0
Working function type with errors
hellovai b5de746
Some code gen works
hellovai ce3e55d
adding work items
hellovai 57bef58
Code generation
hellovai bfbd1a5
Add template string syntax
hellovai 0a93714
feat: expose render_prompt to python
sxlijin 1cb2bd6
strip out dead code
sxlijin 52c5434
improve the pyo3 interface
sxlijin c190a01
set up maturin build steps
sxlijin 6176b9e
add gh workflow
sxlijin 9b692dd
fix workflow
sxlijin fb13d02
setup more release stuff
sxlijin 8d33902
add an upload job
sxlijin 2815d83
fix syntax
sxlijin ffd3432
fix publishing
sxlijin 1448a04
allow oidc
sxlijin 6379603
fix wheel file naming
sxlijin 42e8021
clean up pyo3 version
sxlijin 651de26
try again to fix workflow
sxlijin 328afd0
try again
sxlijin 8a99a65
once more
sxlijin 787a7d3
try again
sxlijin ce0078a
try again...
sxlijin 301a321
rename package
sxlijin a1833d7
fix clients/python
sxlijin fed0b20
Add static analysis function on jinja
hellovai d9d2c5b
Merge branch 'sam/maturin2' into rename
sxlijin 9c4272d
Working JINJA static analyzer
hellovai db7615f
Handle all errors for template_strings too
hellovai dce7b14
fix gh workflow, add render_chat_prompt in python
sxlijin 0c604a9
push up pyi changes
sxlijin 12ecda1
fix pyi file
sxlijin 2cf9982
remove indirection
sxlijin 3ced139
get more stuff working
sxlijin 80494f0
fix compile
sxlijin fd0c028
expose all types
sxlijin 1144b33
more fixes
sxlijin b0967d9
Generate code
hellovai f072084
get the new rust python interface working
sxlijin b5bb444
remove indirect
sxlijin 8e4d1ef
end2end working1
hellovai 50f2ecf
renaming "default_config"
hellovai 2cbe9af
add derives
hellovai 3cc1f92
Add output_schema
hellovai e6dfd34
get globals working
sxlijin 4a61285
make chat/completions splitting work
sxlijin 498b5ef
works with playground
hellovai 28a940a
implement chat splitting and dedenting
sxlijin 9dcda5a
Add syntax highlighting
hellovai a25ac42
Make tests a warning when named incorrected.
hellovai 6a37c5e
vscode preview works now!
sxlijin d630602
clean up the wasm_bindgen interface
sxlijin 8fb63b6
fixes
hellovai 84efcd1
react to tsx changes
sxlijin 65ee762
change wasm_bindgen interface
sxlijin 89bdc23
Fix TODO
hellovai 5b79e0c
Better equality for Jinja
hellovai 6285cb5
Fix errors for bad variables
hellovai e7aa4fe
fix a prompt rendering bug
sxlijin bdbc764
get output_schema working
sxlijin 2e98f49
oops
sxlijin d1ec47c
output_schema does not work
sxlijin 1b42bc7
ctx.output_schema kinda works now
sxlijin f66c16e
get ctx.output_schema working properly
sxlijin 3e76f8c
make output schema work better
sxlijin 58342e1
tweak enum format more for aaron
sxlijin b5820a4
add complex-v2 with AnalyzeProductReview tests
sxlijin 00ec786
support output_schema in python
sxlijin 1e15b0d
make it work
sxlijin 7451d16
a little bit more pyo3
sxlijin 1cbe10a
rip out js files in typescript/common/src
sxlijin c8d86ce
resolve fallback/round-robin in prompt preview
sxlijin 4002487
expose the list of clients
sxlijin 74e3a5c
fix build
sxlijin c779698
Merge branch 'canary' into rename
sxlijin 9a75a5a
make implpanel work
sxlijin be37020
example projects wip
aaronvg 95ce403
Example cards
aaronvg e3ac64c
test case auto-synthesis
sxlijin f288719
mvp impl of save and run is now working
sxlijin 4e29bb1
still needs a lot of ui work
sxlijin cdaf7ef
Fixed typescript integration
hellovai f33c164
improve styling
aaronvg c4addb4
fix more sharing link bugs
aaronvg 679b337
improve test case editor
sxlijin 6ef4ca9
multi file editor
aaronvg c17935d
got token count working, then broke it
sxlijin 54968de
implement token counting, clean up save and run
sxlijin 33aa85e
fix some styles
aaronvg 5381733
Add basic-ass linting
aaronvg 255e5ee
use turbo
aaronvg b58e2ab
some prompt engineering fixes
aaronvg 724e0f2
more prompt engineering
aaronvg b526389
more prompting
aaronvg 80cf134
Add more prompts
aaronvg 9027afe
update playground
aaronvg 740e33c
adding linter
hellovai 1cff60e
disable linter
hellovai cd36912
deactivate ai linter
aaronvg 02e66d7
make class_schema work again
sxlijin c59600f
gitignore baml-schema-wasm web correctly
sxlijin 084879a
some lezer updates
sxlijin 368a752
Generate TS Code
hellovai 3883132
Editable title
aaronvg c804c61
some more fixes
aaronvg bd2c83b
routing changes
aaronvg b9f29d7
clean up fiddle code
aaronvg 263b059
fix rendering issue with the example project files
aaronvg 1ab222b
Add test result to the project contents
aaronvg e4b1957
style tweak
aaronvg 4a8e1cd
more grammar fixes for fiddle
sxlijin 9a929bb
add jinja styling
sxlijin 0b6a6e1
improve highlighting
sxlijin 1c9bb8f
reset the url after running tests so user needs to generate a new one
aaronvg 472ac5d
url resets
aaronvg 147864f
fix vscode esbuild
sxlijin 050efc7
new syntax works in TS!
hellovai 7263b5d
rezisable panel change
aaronvg e39ee09
remove files
hellovai 389e508
add symlinks
hellovai be02598
patch the status undefined
aaronvg 217b550
Fixed with python again!
hellovai 2c6519d
remove handle
aaronvg a69c1dc
tweaks
aaronvg 1e01525
mostly finish syntax highlighting
sxlijin ca4fa85
unsaved changes
aaronvg b606684
fix bad use of hooks
aaronvg 336ca32
fix linting error when switching files
aaronvg 1058444
fix some highlights and add snippets
aaronvg d160cf0
add snippets
aaronvg 8b124cf
reset the output logs, and add a newline spacing for now
aaronvg 5b79f6e
Add linter gutter
aaronvg 77b4a97
fix bug
aaronvg 4003f5c
more fix
aaronvg c096617
merging
hellovai e2b3f46
add examples
sxlijin ec02d92
undo merge conflicts
sxlijin e6dabb2
fix merge conflicts again
sxlijin 02dce46
add examples
sxlijin 9dc1228
fix unable to name new test
aaronvg 7ded33f
more fix
aaronvg 8fd6347
minor comments
hellovai e6fa555
use tests as files
hellovai cb4139e
command w should not close the tab
aaronvg ed94301
Update listeners
hellovai 070e732
add rendering
hellovai ea33839
update lock file
hellovai 0ff10df
fix compiler errors
hellovai 7e35c61
adding PYI file
hellovai 086396f
ignore ffi errors python
hellovai b57fe4c
update ini
hellovai a650e2c
remove trailing comment
hellovai 1575987
fix ini file
hellovai cd4d107
fix ruff
hellovai b16d11a
udpate workflow
hellovai 0471d38
udpate workflow
hellovai 64b756d
Make codemirror refresh and relint when files change
aaronvg c0d63f3
Some cleanup
aaronvg 2140823
fixed tests
hellovai 49c0dc7
Fix resizing performance issues, text overflow bugs, and test error o…
aaronvg 18afcaa
fix stuff
aaronvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
31 changes: 31 additions & 0 deletions
31
engine/baml-lib/baml/tests/validation_files/functions_v2/invalid.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,31 @@ | ||
function Foo() -> { | ||
client Bar | ||
prompt #"fa"# | ||
} | ||
|
||
function FooBar(arg) -> bar { | ||
|
||
} | ||
|
||
|
||
// error: Error validating function "Foo": No return type specified. Valid function syntax is | ||
// ``` | ||
// function Foo(param1: String, param2: String) -> ReturnType { | ||
// client SomeClient | ||
// prompt #"..."# | ||
// } | ||
// ``` | ||
// --> functions_v2/invalid.baml:1 | ||
// | | ||
// | | ||
// 1 | function Foo() -> { | ||
// 2 | client Bar | ||
// 3 | prompt #"fa"# | ||
// 4 | } | ||
// | | ||
// error: Error validating: No type specified for argument: arg. Expected: `arg: type` | ||
// --> functions_v2/invalid.baml:6 | ||
// | | ||
// 5 | | ||
// 6 | function FooBar(arg) -> bar { | ||
// | |
92 changes: 92 additions & 0 deletions
92
engine/baml-lib/baml/tests/validation_files/functions_v2/invalid2.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,92 @@ | ||
function Foo1(arg: int) -> float { | ||
client Foo | ||
} | ||
|
||
function Foo2(arg: int) -> float { | ||
prompt #"..."# | ||
} | ||
|
||
function Foo3(arg: int) -> float { | ||
client bar | ||
prompt "..." | ||
} | ||
|
||
|
||
function Foo4(arg: int) -> float { | ||
client bar | ||
prompt | ||
} | ||
|
||
|
||
function Foo5(arg: int) -> float { | ||
client | ||
prompt #"..."# | ||
} | ||
|
||
|
||
function Foo6(arg: int) -> float { | ||
client | ||
prompt | ||
} | ||
|
||
// error: Error validating: Missing `prompt` field in function. Add to the block: | ||
// ``` | ||
// prompt #"..."# | ||
// ``` | ||
// --> functions_v2/invalid2.baml:1 | ||
// | | ||
// | | ||
// 1 | function Foo1(arg: int) -> float { | ||
// | | ||
// error: Error validating: Missing `client` field in function. Add to the block: | ||
// ``` | ||
// client GPT4 | ||
// ``` | ||
// --> functions_v2/invalid2.baml:5 | ||
// | | ||
// 4 | | ||
// 5 | function Foo2(arg: int) -> float { | ||
// | | ||
// error: Expected a template_string value, but received string value `"..."`. | ||
// --> functions_v2/invalid2.baml:11 | ||
// | | ||
// 10 | client bar | ||
// 11 | prompt "..." | ||
// | | ||
// error: Error validating: Missing `prompt` field in function. Add to the block: | ||
// ``` | ||
// prompt #"..."# | ||
// ``` | ||
// --> functions_v2/invalid2.baml:9 | ||
// | | ||
// 8 | | ||
// 9 | function Foo3(arg: int) -> float { | ||
// | | ||
// error: Error validating: Missing `prompt` field in function. Add to the block: | ||
// ``` | ||
// prompt #"..."# | ||
// ``` | ||
// --> functions_v2/invalid2.baml:15 | ||
// | | ||
// 14 | | ||
// 15 | function Foo4(arg: int) -> float { | ||
// | | ||
// error: Error validating: Missing `client` field in function. Add to the block: | ||
// ``` | ||
// client GPT4 | ||
// ``` | ||
// --> functions_v2/invalid2.baml:21 | ||
// | | ||
// 20 | | ||
// 21 | function Foo5(arg: int) -> float { | ||
// | | ||
// error: Error validating: Missing `prompt` and `client` fields in function. Add to the block: | ||
// ``` | ||
// client GPT4 | ||
// prompt #"..."# | ||
// ``` | ||
// --> functions_v2/invalid2.baml:27 | ||
// | | ||
// 26 | | ||
// 27 | function Foo6(arg: int) -> float { | ||
// | |
9 changes: 9 additions & 0 deletions
9
engine/baml-lib/baml/tests/validation_files/functions_v2/valid.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,9 @@ | ||
function Foo() -> int { | ||
client Bar | ||
prompt #"fa"# | ||
} | ||
|
||
function Bar(a: string, b: int | bool) -> int { | ||
client Bar | ||
prompt #"fa"# | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sxlijin here!