-
Notifications
You must be signed in to change notification settings - Fork 38
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
docs: make dynamic clients discoverable #837
base: canary
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This pull request introduces significant changes across multiple files, focusing on reorganization, dependency updates, and removal of certain functionalities.
-
Reorganization of Documentation:
docs/docs.yml
: Reordered navigation structure for better logical flow.docs/docs/snippets/client-constructor.mdx
: Added new section for special providers (fallback
,round-robin
).
-
Dependency and Build Script Updates:
engine/Cargo.toml
: Addedinternal-baml-schema-ast
dependency.engine/baml-fmt/Cargo.toml
: Removedcolored
dependency; addedinternal-baml-core
andinternal-baml-schema-ast
.
-
Functionality Removal:
engine/baml-fmt/build.rs
: Deleted build script for storing Git commit hash.engine/baml-fmt/src/lib.rs
: Commented out entire file, disabling all functionality.engine/baml-fmt/src/main.rs
: Simplified to an emptymain
function, removing CLI options.
-
Code Modularization:
engine/baml-lib/schema-ast/src/parser/mod.rs
: Modularized parsing logic into sub-modules for better maintainability.
-
File Cleanup:
engine/baml-runtime/.turbo/daemon/eeecc271d7c9d7d2-turbo.log.2024-06-10
: Removed log file to prevent clutter.integ-tests/typescript/test-report.html
: Deleted test report file, indicating a change in test result visibility.
These changes should be reviewed carefully to ensure they align with project goals and do not disrupt existing workflows.
12 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The pull request enhances the discoverability of dynamic clients by introducing new structures and methods across multiple files.
-
New Structs and Methods:
engine/baml-lib/baml-core/src/ir/repr.rs
: AddedTestCaseFunction
struct and updatedTestCase
struct to includeTestCaseFunction
nodes.engine/baml-schema-wasm/src/runtime_wasm/mod.rs
: AddedWasmParentFunction
andWasmTestCase
structs for better test case handling.
-
Workspace Dependency:
engine/baml-schema-wasm/Cargo.toml
: Addedinternal-baml-core
as a workspace dependency.
-
Test Execution Enhancements:
typescript/playground-common/src/baml_wasm_web/EventListener.tsx
: AddeduseRunHooks
andrun_test
command for dynamic test execution.
-
Project Management Improvements:
typescript/vscode-ext/packages/language-server/src/lib/baml_project_manager.ts
: Introducedlist_testcases
method and enhanced error handling.
-
VSCode Integration:
typescript/vscode-ext/packages/vscode/src/extension.ts
: Addedbaml.runBamlTest
command for running tests directly from the editor.
9 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
9e91b2c
to
2f890f8
Compare
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.
PR Summary
(updates since last review)
The pull request focuses on improving the discoverability and organization of BAML documentation, particularly for dynamic clients.
-
Documentation Structure:
docs/docs.yml
: Enhanced navigation and added redirects for better user experience.
-
VSCode Extension Clarifications:
docs/docs/get-started/quickstart/python.mdx
,ruby.mdx
,typescript.mdx
: Clarified automation provided by the VSCode extension.
-
New Documentation Snippet:
docs/docs/snippets/clients/accordion.mdx
: Added for testing AccordionGroup component with various providers.
-
Provider Updates:
docs/docs/snippets/clients/providers/huggingface.mdx
,ollama.mdx
,together.mdx
,vllm.mdx
: Updated provider names and configurations for accuracy.
-
Validation File Removal:
engine/baml-fmt/src/validate.rs
: Removed, indicating a significant refactor in validation handling.
14 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings
|
||
See https://docs.together.ai/docs/openai-api-compatibility for more information. | ||
|
||
```baml BAML | ||
client<llm> MyClient { | ||
provider openai | ||
provider openai-generi |
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.
Spelling: Typo in provider name openai-generi
provider openai-generi | |
provider openai-generic |
@@ -0,0 +1,96 @@ | |||
function InputNone() -> int { | |||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
} | ||
|
||
function InputSimple(a: string, b: int | bool) -> int { | ||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
} | ||
|
||
function InputObject(email: Email) -> string { | ||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
} | ||
|
||
function InputEnum(color: Color) -> string { | ||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
|
||
// Or else | ||
{ | ||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
|
||
|
||
function InputImage(image: image) -> string { | ||
client "openai/gpt-4o" |
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.
Logic: Client openai/gpt-4o
not found. Ensure the client is defined or replace with an existing client.
No description provided.