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.
This pull request introduces several important improvements to backend configuration, credentials management, and documentation, as well as adds support for microphone device capture as an optional feature. The changes focus on making backend API key management more secure and flexible, updating TOML config and documentation to reflect these improvements, and adding new build and test options for microphone capture support.
Backend credentials and configuration improvements:
llm.credentialssection in TOML, allowing centralized management of API keys. Backends now reference credentials viacredential_refinstead of directly specifying environment variable names (api_key_env). This change is reflected in both English and Chinese documentation (docs/backend-adapter/backends-en.md,docs/backend-adapter/backends-zh.md). [1] [2] [3] [4] [5] [6] [7]openai_compatibletoopenai_chat_completionandopenai_realtimetoopenai_realtime_wsin both documentation and configuration examples. [1] [2]Documentation and engineering spec updates:
docs/api/spear-hostcall/chat-completion-en.md,docs/api/spear-hostcall/chat-completion-zh.md). [1] [2]mic-device feature) in the index and added references to detailed credential implementation notes. [1] [2] [3]Mic device capture feature and build/test support:
cpal,tokio-tungstenite,url,rustls) toCargo.tomlto support microphone device capture and secure websocket communication. Introduced the optionalmic-devicefeature for conditional compilation. [1] [2]Makefileto add targets for testing (test-mic-device) and building with the microphone device feature on macOS (mac-build,mac-build-release). [1] [2]mic_rtasr.wasmsample for bothzigandclangtoolchains, with improved error handling and WASI sysroot support.Configuration changes for SMS and spearlet:
config/sms/config.tomlto enable web admin by default and move[grpc]and[http]sections to the end for clarity. [1] [2]config/spearlet/config.toml, demonstrating how to route requests and reference credentials.