Het gebruiksprobleem na het gebruik van AI-vertaling

I followed the official tutorial to configure Discourse AI for translation and set it to translate all past posts over a span of days. Indeed, this resulted in a substantial amount of input and output tokens. However, after two days, I encountered a situation where only input tokens were being processed without any output. I am unsure of the cause—could it be that all the previous posts have already been translated? If so, what measures can I take to reduce token input and thereby conserve costs?

Hey there, have you followed these recommendations?

The usage graph definitely looks concerning. Can you try out this data explorer query:

SELECT 
  a.id,
  a.language_model,
  LENGTH(p.raw) as raw_length,
  a.response_tokens,
  a.raw_request_payload,
  a.raw_response_payload,
  a.topic_id,
  a.post_id
FROM ai_api_audit_logs a
LEFT JOIN posts p ON p.id = a.post_id AND p.deleted_at IS NULL
LEFT JOIN topics t ON t.id = a.topic_id AND t.deleted_at IS NULL
WHERE a.created_at > CURRENT_DATE - INTERVAL '1 days'
AND p.deleted_at IS NULL
AND t.deleted_at IS NULL
AND p.user_deleted = false
AND a.feature_name = 'translation'
AND LENGTH(p.raw) < 1000
AND a.response_tokens > 10000
ORDER BY a.created_at DESC
LIMIT 100

The query should show you the number of response tokens used based on the post’s raw length. Ideally you should see a similar number, not more than 1.5x tokens. The AiApiAuditLog will help with determining what is going on.

Additionally please share,

  • What model are you using?
  • What’s your backfill hourly rate? I suggest to keep it to a low value, like 50 for starters.
  • How many languages are you supporting? Does your selected model support them?

Ik heb GPT-4.1 Nano geconfigureerd als het vertaalmodel. De uurtarief voor backfill was eerder ingesteld op 1.000, maar vandaag heb ik deze aangepast naar 100. Ik heb ondersteuning ingeschakeld voor zowel Japans als Engels, en dit model ondersteunt deze talen inderdaad.

Ja, 1000 is waarschijnlijk geen goed idee en ik zou hier een limiet voor site-instellingen moeten toevoegen.

Ik weet niet zeker hoe de OpenAI API omgaat met ongeveer 3000x per uur geraakt worden. In feite doen we voor jouw setup per bericht: :één: taaldetectie, :twee: vertalen naar het Japans, :drie: vertalen naar het Engels. Als je /logs controleert, vermoed ik dat je site rate limits zal raken.

Ik stel voor om het nog steeds te verlagen naar 50 en te kijken hoe het gaat.

We zullen in de nabije toekomst ook een manier implementeren om de vertaalvoortgang van de hele site te bekijken.

1 like

Furthermore, when I execute the query command you provided, the database returns no results. Is there perhaps a need for some customization or modification?

Hmm, deze query zou moeten werken. Heb je de discourse-data-explorer-plugin?

Oké, ik zal het eerst proberen. Dank u wel.

Ik zal het daarna installeren en het dan nog eens proberen. Het herbouwen van het forum is momenteel niet haalbaar omdat de gebruikers het nog actief gebruiken.