2023-04-25 21:44:29 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AiApiAuditLog < ActiveRecord::Base
|
|
|
|
module Provider
|
|
|
|
OpenAI = 1
|
2023-05-11 09:03:03 -04:00
|
|
|
Anthropic = 2
|
2023-07-27 12:55:32 -04:00
|
|
|
HuggingFaceTextGeneration = 3
|
2023-04-25 21:44:29 -04:00
|
|
|
end
|
|
|
|
end
|
2023-05-11 09:03:03 -04:00
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: ai_api_audit_logs
|
|
|
|
#
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
# provider_id :integer not null
|
|
|
|
# user_id :integer
|
2023-10-31 17:41:31 -04:00
|
|
|
# topic_id :integer
|
|
|
|
# post_id :integer
|
2023-05-11 09:03:03 -04:00
|
|
|
# request_tokens :integer
|
|
|
|
# response_tokens :integer
|
|
|
|
# raw_request_payload :string
|
|
|
|
# raw_response_payload :string
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
#
|