-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Charles Packer <[email protected]> Co-authored-by: dboyliao <[email protected]> Co-authored-by: Shubham Naik <[email protected]> Co-authored-by: Shubham Naik <[email protected]> Co-authored-by: Caren Thomas <[email protected]> Co-authored-by: Sarah Wooders <[email protected]> Co-authored-by: Nuno Rocha <[email protected]> Co-authored-by: Theo Conrads <[email protected]> Co-authored-by: Jyotirmaya Mahanta <[email protected]> Co-authored-by: Stephan Fitzpatrick <[email protected]> Co-authored-by: Stephan Fitzpatrick <[email protected]> Co-authored-by: mlong93 <[email protected]> Co-authored-by: Mindy Long <[email protected]> Co-authored-by: Krishnakumar R (KK) <[email protected]>
- Loading branch information
1 parent
cc8f93c
commit 02a579f
Showing
12 changed files
with
134 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Sync Code | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, '[sync-skip]') }} | ||
steps: | ||
- name: Trigger repository_dispatch | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: token ${{ secrets.SYNC_PAT }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/letta-ai/letta-cloud/dispatches \ | ||
-d '{"event_type":"oss-update"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.6.9" | ||
__version__ = "0.6.13" | ||
|
||
|
||
# import clients | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from typing import TYPE_CHECKING, Optional | ||
|
||
from sqlalchemy import ForeignKey | ||
from sqlalchemy.orm import Mapped, mapped_column, relationship | ||
|
||
from letta.orm.sqlalchemy_base import SqlalchemyBase | ||
|
||
if TYPE_CHECKING: | ||
from letta.orm.job import Job | ||
|
||
|
||
class JobUsageStatistics(SqlalchemyBase): | ||
"""Tracks usage statistics for jobs, with future support for per-step tracking.""" | ||
|
||
__tablename__ = "job_usage_statistics" | ||
|
||
id: Mapped[int] = mapped_column(primary_key=True, doc="Unique identifier for the usage statistics entry") | ||
job_id: Mapped[str] = mapped_column( | ||
ForeignKey("jobs.id", ondelete="CASCADE"), nullable=False, doc="ID of the job these statistics belong to" | ||
) | ||
step_id: Mapped[Optional[str]] = mapped_column( | ||
nullable=True, doc="ID of the specific step within the job (for future per-step tracking)" | ||
) | ||
completion_tokens: Mapped[int] = mapped_column(default=0, doc="Number of tokens generated by the agent") | ||
prompt_tokens: Mapped[int] = mapped_column(default=0, doc="Number of tokens in the prompt") | ||
total_tokens: Mapped[int] = mapped_column(default=0, doc="Total number of tokens processed by the agent") | ||
step_count: Mapped[int] = mapped_column(default=0, doc="Number of steps taken by the agent") | ||
|
||
# Relationship back to the job | ||
job: Mapped["Job"] = relationship("Job", back_populates="usage_statistics") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters