Skip to content

Commit

Permalink
Optional 'file statistics' added to FileInfo holder (provided by Azure)/
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbanda committed Nov 13, 2023
1 parent 45af031 commit 344a330
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ object JsonFormats {
implicit val embeddingFormat: Format[EmbeddingResponse] =
Json.format[EmbeddingResponse]

implicit val fileStatisticsFormat: Format[FileStatistics] = Json.format[FileStatistics]
implicit val fileInfoFormat: Format[FileInfo] = Json.format[FileInfo]

implicit val fineTuneEventFormat: Format[FineTuneEvent] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ case class FileInfo(
id: String,
bytes: Long,
created_at: ju.Date,
updated_at: Option[ju.Date],
filename: String,
purpose: String,
status: String, // uploaded, processed, pending, error, deleting or deleted
status_details: Option[String]
status_details: Option[String],
statistics: Option[FileStatistics]
)

case class FileStatistics(
// The number of contained training examples in files of kind "fine-tune" once validation of file content is complete.
examples: Int,
// The number of tokens used in prompts and completions for files of kind "fine-tune" once validation of file content is complete.
tokens: Int
)

0 comments on commit 344a330

Please sign in to comment.