APPL v0.2.0: Major Improvements Compared to v0.1.2
🚀 Key Updates
1. Automatic Initialization and Enhanced Configuration
- Auto Initialization: No need to call
appl.init()
to initialize APPL. - Configuration Updates:
- Use
appl.yaml
to overwrite the configs is still effective, with warning on items not in the config (useful for checking wrong configs). - Use
appl.init(**kwargs)
or command line for runtime updates. - Introduced Pydantic models for stricter type checking of configs and
global_vars
. - Command-line support via
jsonargparse
(see cmd args example).
- Use
2. Advanced Tracing and Visualization
- Langfuse and Lunary Integration:
- Visualize traces with metadata such as git info and command-line arguments.
- Store code for
ppl
and@traceable
functions in trace for viewing in Langfuse. - New
print_trace
function to send traces, can be called at the end.
appltrace
Command: Export traces to multiple formats:- Langfuse (recommended), Lunary, HTML, Chrome tracing, etc.
3. New Features
- Explicit Growing Prompts:
- Use
grow
to explicitly grow the prompt.
- Use
- Independent
gen
Calls:appl.gen
(orappl.completion
) can be called outside ofppl
function with messages, behavior like a wrapper aroundlitellm.completion
.
- Auto Continuation:
- Automatically continue the generation stopped due to length limit. Ask for repeating the last line and concatenate by overlapping to achieve a reliable continuation.
- LLM Call Caching:
- Add persistent Database for caching LLM calls with
temperature=0
.
- Add persistent Database for caching LLM calls with
- Concurrency:
- Add global executor pool with configurable
max_workers
to limit the number of parallel LLM calls.
- Add global executor pool with configurable
- Better Image and Audio Support:
- Support pillow's Image as part of prompt.
- Support Audio as part of the prompt.
4. More Examples
- Tree-of-Thought:
- Add example for tree-of-thought with much less codes and enabled parallelization with about 6x speedup.
- Virtual Tool:
- Add example for using LLM to emulate tool execution.
- Streamlit:
- Add example for using streamlit to build a chat web-app with APPL.
- Command Args:
- Add example for using command args to update configs.
- Cursor Usage [Experimental]:
- Add example cursor rules for better using cursor to generate APPL codes.
5. Updated Default Configs
- Defaults:
- Default server is now
None
(explicit setup required viaappl.yaml
, command line, orappl.init(servers=...)
). You can use model name as server name without setting the server configs. - Logging: Enabled file logging by default but disabled logging LLM call arguments by default.
- Streaming: default to
print
the streaming output, waslive
usingrich.Live
before.
- Default server is now
6. Miscellaneous Fixes
- Minor bugs fixed and improved code readability.
- Code refactored for better maintainability.
Full Changelog: v0.1.2...v0.2.0