- Migrated from pydantic v1 to v2 incurring various changes.
SingletonPerName
fieldinstances
renamed to_instances
due to possible shadowing ofinstances
field in subclassed models.
ObjSerial
class removed.Obj
now indicate whether they are loadable wheninit_bindings
is not None.WithClassInfo
field__tru_class_info
renamed totru_class_info
as pydantic does not allow underscore fields.
- Database interfaces changed from sqlite to sqlalchemy. Sqlite databases are
supported under the sqlaclchemy interface and other databases such as mysql
and postgresql are also now usable. Running the migration scripts via
TruSession().migrate_database()
may be necessary.
- Class
Cost
has new fieldn_stream_chunks
to count the number of received chunks in streams. This is only counted when streaming mode (i.e. in OpenAI) is used.
-
Class
Provider
contains the attributeendpoint
which was previously excluded from serialization but is now included. -
Class
FeedbackCall
has new attributemeta
for storing additional feedback results. The value will be set to an empty dict if loaded from an older database that does not have this attribute. -
Class
FeedbackCall
has new attributemeta
for storing additional feedback
-
Class
Record
ofschema.py
:- Attributes
main_input
,main_output
, andmain_error
generalized toJSON
(not strict json) allowing the attribute to contain strings like before the change but also sequences and dictionaries (with string keys) of json.
- Attributes
Backwards compatibility will be removed in 0.3.0 at earliest.
- class
Query
of schema.py renamed toSelect
.
-
Json serialization of
WithClassInfo
mixin:- Key
class_info
renamed to__tru_class_info
.
- Key
-
Json serialization of
ObjSerial
class:- Attribute
init_kwargs
expanded intoinit_bindings
, serialized by a new classBindings
, containing both args and kwargs.
- Attribute
Backwards compatibility will be removed in 0.3.0 at earliest.
-
File
tru_feedback.py
renamed tofeedback.py
. -
File
tru_db.py
renamed todb.py
and:- Class
TruDB
renamed toDB
.
- Class
-
File
tru_app.py
renamed toapp.py
and:- Class
TruApp
renamed toApp
.
- Class
-
In file
schema.py
:- Class
App
renamed toAppDefinition
.
- Class
-
DB schema changes:
-
Table
apps
: -
Field
chain_id
renamed toapp_id
.
-