When starting a new chat with a registered function, under many situations I get this warning:
/Users/cvaske/.pyenv/versions/3.12.1/lib/python3.12/site-packages/pydantic/main.py:1406: RuntimeWarning: fields may not start with an underscore, ignoring "__required__"
warnings.warn(f'fields may not start with an underscore, ignoring "{f_name}"', RuntimeWarning)
What I Did
import chatlab
def add_two_numbers(a: float, b: float) -> float:
"""Add two numbers together. Raises an exception when the numbers are in the wrong order."""
if b < a:
return a + b
raise Exception("I can't do math")
chat = chatlab.Chat(model=chatlab.models.GPT_4_0125_PREVIEW, chat_functions=[add_two_numbers])
await chat("Please add 1 + 2 for me")
Description
When starting a new chat with a registered function, under many situations I get this warning:
What I Did