Logo
Explore Help
Sign In
discourse/discourse-ai
1
0
Fork 0
You've already forked discourse-ai
mirror of https://github.com/discourse/discourse-ai.git synced 2025-07-06 22:42:14 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-ai/app/serializers/ai_api_audit_log_serializer.rb

19 lines
473 B
Ruby
Raw Normal View History

DEV: Use explicit serializers for all models (#691)
2024-06-27 10:43:00 -03:00
# frozen_string_literal: true
class AiApiAuditLogSerializer < ApplicationSerializer
attributes :id,
:provider_id,
:user_id,
:request_tokens,
:response_tokens,
:raw_request_payload,
:raw_response_payload,
:topic_id,
:post_id,
:feature_name,
:language_model,
FEATURE: improve tool support (#904) This re-implements tool support in DiscourseAi::Completions::Llm #generate Previously tool support was always returned via XML and it would be the responsibility of the caller to parse XML New implementation has the endpoints return ToolCall objects. Additionally this simplifies the Llm endpoint interface and gives it more clarity. Llms must implement decode, decode_chunk (for streaming) It is the implementers responsibility to figure out how to decode chunks, base no longer implements. To make this easy we ship a flexible json decoder which is easy to wire up. Also (new) Better debugging for PMs, we now have a next / previous button to see all the Llm messages associated with a PM Token accounting is fixed for vllm (we were not correctly counting tokens)
2024-11-12 08:14:30 +11:00
:created_at,
:prev_log_id,
:next_log_id
DEV: Use explicit serializers for all models (#691)
2024-06-27 10:43:00 -03:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 109ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API