You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd find it super useful to have timestamps when user and assistant turns completed embedded in Chat/Turn objects. One use case beyond my own that this would make straightforward is calculating tokens/sec. I'd like to use this for an R port of a Python LLM eval framework, rinspect.
Inspect implements this by recording the time right before a request is made and then another right after it completes, logging the former as the time when the user turn completed and the latter as the time that the assistant turn completed. I've hacked together a similar implementation while testing and it's served my purposes so far, though I haven't verified that timestamps of tool calls are handled reasonably.
I'd rather not implement this in rinspect itself as I'd like for users to be able to supply arbitrary functions wrapping ellmer Chats that define their "solver." With timestamping implemented, rinspect can just derive all of the information it needs from a Chat. Without it, users would have to do their own timestamping inside of those functions. e.g.:
# without built-in timestampingsolver<-function(x, chat) {
# do some stuff...time_start<- Sys.time()
result<-chat$chat(x)
time_completed<- Sys.time()
# do some stuff...# one timestamp per Turnlist(result=result, chat=chat, timestamps=list(time_start, time_completed))
}
# with built-in timestampingsolver<-function(x, chat) {
# do some stuff...result<-chat$chat(x)
# do some stuff...list(result=result, chat=chat)
}
The text was updated successfully, but these errors were encountered:
I'd find it super useful to have timestamps when user and assistant turns completed embedded in Chat/Turn objects. One use case beyond my own that this would make straightforward is calculating tokens/sec. I'd like to use this for an R port of a Python LLM eval framework, rinspect.
Inspect implements this by recording the time right before a request is made and then another right after it completes, logging the former as the time when the user turn completed and the latter as the time that the assistant turn completed. I've hacked together a similar implementation while testing and it's served my purposes so far, though I haven't verified that timestamps of tool calls are handled reasonably.
I'd rather not implement this in rinspect itself as I'd like for users to be able to supply arbitrary functions wrapping ellmer Chats that define their "solver." With timestamping implemented, rinspect can just derive all of the information it needs from a Chat. Without it, users would have to do their own timestamping inside of those functions. e.g.:
The text was updated successfully, but these errors were encountered: