All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed a bug where the final render of a tool call wasn't using the custom render.
- New
tools
namespace to replace thebuiltins
namespace. - Simplified
Palette
class incolors.py
for displaying color palettes, now leveraging Pydantic for validation.
- Default model in
Chat
class constructor now uses theGPT_3_5_TURBO
enum. - Migrated
run_cell
torun_python
to avoid naming confusion and deprecatedrun_cell
. - Updated documentation and examples to reflect the new
tools
namespace and usage patterns. - Removed
__required__
fromextract_model_from_function
inregistry.py
to suppress Pydantic warnings.
- Ensured the final tool call result properly updates the UI to reflect the outcome of tool execution.
- Support parallel tool calling by default in
Chat
. - Legacy support for function calling is available by passing
legacy_function_calling=True
to theChat
constructor. - 🆕
@incremental_display
decorator (see #136) that allows you to stream visualizations to the user as the model fills out function arguments.
- Support tool call format from
FunctionRegistry
. Enables parallel function calling (note: not inChat
yet). #122
- Drop Noteable builtin
- ⏃ Automatically instantiate pydantic models when they are passed as parameters to a function call
- Support setting a custom
base_url
from chatlab import Chat
chat = Chat(
base_url="http://localhost:8000/v1",
api_key="functionary"
)
- 🐛 input prompts were appearing after assistant and function calls
- New Knowledge Graph example
- Switched all docs to chatlab.dev
- No more
--pre
required for installs
-
📚 Documentation now available at chatlab.dev
-
📚 Pre-release Documentation now available at pre.chatlab.dev
-
🎛️ New option
replace_hallucinated_python
to replace any hallucinated python function with a custom one. This allows you to create notebook cells, run IPython, or even shell out to a regular python interpreter. -
🪄 Introduced
make_magic
on aChat
so that you can use a current chat as a cell magic in IPython and Jupyter notebooks -
⏩ Accept async functions as chat functions
-
👉🏻 You MUST now call
await chat()
instead of justchat()
now that chat is async -
📗 New experimental builtin: Noteable. Create notebooks on Noteable like you can via ChatGPT Plugins with even more flexibility.
-
🧩 Accept collections of functions to
Chat
andFunctionRegistry
to register multiple functions at once -
🧩 Enhanced type support in the registry, including handling of
Union
,List
,Dict
,Literal
, andEnum
types. -
🎨 Added a decorator for registering functions with a schema, allowing more flexible function registration.
-
📑 Added
registry.get_schema
method to retrieve a function schema by name. -
[Builtins] 📁 Chat File functions:
list_files
: List all files in a directory.get_file_size
: Get the size of a file.is_file
: Check if a path points to a file.is_directory
: Check if a path points to a directory.write_file
: Write content to a file.read_file
: Read content from a file.
-
[Builtins] 🐚 Chat Shell Functions:
run_shell_command
: Run a shell command and return the output.
- 🔄
chatlab.Chat
is nowchatlab.Conversation
to improve readability ⚠️ Deprecatedchatlab.Conversation
- 🔄
submit
is now an async function to allow registering functions - 📜 Improved UI: Scrollbars for function inputs and outputs now only appear on the x-axis when content is too large
- 🛑🔙 Enhanced error handling: Python interpreter traceback is no longer displayed in the notebook when it is included in the ChatLab output pane.
- 🐍 The python builtin's name has been changed to
run_python
- 🧹 Refactored
generate_function_schema
andregister
methods in the registry to simplify and enhance functionality. - 🚨 Updated error handling and messages related to type annotations.
⚠️ Bothchatlab.Session
andchatlab.Conversation
are now deprecated in favor ofchatlab.Chat
- 🐍🔙 Send a traceback to the LLM when an exception occurs in the builtin python interpreter
- 📦 Update description and classifiers for PyPI
- ❌ Remove unused packages
- 📦 Include universal wheels in build
- 📦 Loosened the requirements for IPython and ipykernel to allow jupyterlite and pyodide to use this package
- 🐍 Greatly enhanced Python interpreter that displays images inline and provides a trimmed down representation of objects for Large Language Model Consumption, relying on repr_llm
- One line in the changelog was off
- Testing the release workflow
- 🏷️ New
expose_exception_to_llm
decorator allows function exceptions to be exposed to the large language model. This is useful for when the model is running code via IPython'srun_cell
or any other interpreter where the model needs feedback on exceptions.
- 🔄 Package name changed from
murkrow
tochatlab
! 💬🔬 - 🤓 Simplified the
register
methods of theConversation
andFunctionRegistry
classes. The parametersparameters_model
andjson_schema
are replaced by a single parameterparameter_schema
, which can be a pydantic model or a JSON schema. This streamlines and simplifies the function registration process by accepting both pydantic models and JSON schema as parameter schemas in a single argument instead of two separate arguments. This reduces ambiguity and simplifies the implementation. - 💪🏻 Improved typing for messaging
- 📝 Documentation improvements
- 📜 When outputs and inputs are too big, allow scrolling instead of overflowing
- 🔐 Check for
OPENAI_API_KEY
onConversation
creation
- 🐛 Fixed the run_cell builtin to actually return the result. This reintroduces side effects of display output, meaning outputs from run_cell will now appear in the notebook and be visible to the Language Model as part of the run.
- ✅ Extended type for parameters_model is now correctly
Optional[Type["BaseModel"]]
so that you can extend a model for parameters in your own typed Python code. This is now mypy compliant.
- 🚗 Took out the
auto_continue
option since it only applied to function calls and generally should beTrue
for function call responses
- 🐍 Include a builtin
python
chat function to handle the model's hallucination ofpython
being an available chat function. Enable it withallow_hallucinated_python
to theConversation
or theFunctionRegistry
. NOTE: it runs in the same runtime as theConversation
and will be used to execute arbitrary code. Use with caution. Or delight. - 🤩 Auto infer schemas for functions. Run
session.register(function)
. This is a great way to get started quickly. Note: you will get better results in some cases by using You may still get better results out of using pydantic models since those can have descriptions and other metadata in the resulting JSON schema. - 🆕 Accept functions with a JSON Schema for Function calling. This should make functions portable across any other libraries are are accepting the OpenAI standard for function calling.
Session
has been renamed toConversation
to be more understandable.Session
will have a deprecation warning until it is removed for 1.0.0.chat
has been renamed tosubmit
to better reflect that it's sending the current batch of messages on.chat
will have a deprecation warning until it is removed for 1.0.0- Shifted some errors that bubbled up as exceptions to the end user to instead be
system
messages for the LLM
- Removed
deltas
iterator forStreamCompletion
, favoring the new conversations API instead.
- Don't emit empty assistant messages
- Updated README with more documentation
- Fixed a bug where zero functions would create an
InvalidRequestError: [] is too short - 'functions'
- A little chat function displayer
- Created a simple OpenAI chat interface for use in interactive computing environments