DiscourseのAI機能のデバッグ: OpenAIは応答するがフォーラムは応答しない場合

Discourse のための AI 関数を開発していただきありがとうございます。これは将来的に重要な機能になると思います。

自己ホスト型フォーラム (tff-forum.de) で AI プラグインを試しました。管理パネルに OpenAI API キーを追加し、さまざまな機能に対してモデル「gpt-3.5-turbo-16k」を有効にすると、フォーラムのさまざまな場所に AI ボタンが表示されます。

いずれかのボタンをクリックすると、何も返ってこないか、次のスクリーンショットに示されているエラーメッセージが表示されます。

OpenAI の使用状況ダッシュボードで API リクエストを確認できますが、Discourse が応答を受信していないようです。

他のモデル (gpt-35、gpt-4 など) も試しましたが、結果は常に同じで、機能は応答を生成しません。

Discourse のエラーログには、AI 関数に関する問題は表示されません。

問題をデバッグまたは分析する方法について、追加情報を提供していただけますか?

サーバーで以下の指示をお試しください。

「いいね!」 1

Open AI API の機能をチェックするスクリプトをご提供いただきありがとうございます。

サーバーでスクリプトを開始したところ、gpt から以下の回答が得られました。

...
 {
 "index": 0,
 "message": {
 "role": "assistant",
 "content": "In the heart of the coded rhyme,\nBehold, there’s a concept sublime.\nIt's recursion, an art, an ancient tradition,\nOf a function calling itself, that's the mission.\n\nA function so proud, will not heed the call,\nOf any other, it stands tall.\nIt opts to invoke itself anew,\nThus, weaving patterns that intrigue view.\n\nWhen it starts, you might suppose,\nWhere it ends, no one knows?\nBut fear, not the infinite loop,\nFor base case is our saving hoop.\n\nUpon reaching the base so divinely small,\nThe function at last does forestall.\nSo, it stops and does not bind,\nReturning what it's meant to find.\n\nWho would make such hearty appeal?\nAn elegant way to seal the deal.\nSolving mazes, or reversing strings,\nSee recursion spreading its wings.\n\nEach instance has its memory stack,\nTo trace its way, front to back.\nAnd as these instances grow,\nA tower of memory, they bestow.\n\nWhen done right, the harmony is pure,\nRecursion’s charm, quite the lure.\nIt’s elegance, it’s profound autonomy,\nA jewel in the crown of algorithms' ceremony.\n\nIt's a dance, it's a play, eternal reprise,\nIn the theater of codes, where recursion lies.\nBehold the beauty, behold the excursion,\nIn the vast realm of code, that's the recursion."
 },
 "logprobs": null,
 "finish_reason": "stop"
 }
 ],
 "usage": {
 "prompt_tokens": 39,
 "completion_tokens": 282,
 "total_tokens": 321
 },
 "system_fingerprint": null
}

この呼び出しは機能しているようです。しかし、同じ Open AI API キーを使用して Discourse AI 機能(例:「composer ai helper」)をアクティブにすると、応答がないか、このスレッドの最初の投稿に示されているエラーメッセージが表示されます。

Open AI API の呼び出しをデバッグする他の方法はありますか?

最新版にアップデートしましたか? LLMの設定を別の領域に移動しました。

「いいね!」 1

サポートありがとうございます。本日再構築を開始したところ、OpenAI API をベースにした機能が動作するようになりました。

しかし、新たな問題に気づきました。再構築後、管理設定で OpenAI モデルを変更できなくなりました。リストは空のようですが、Discourse は最後の設定である「gpt-4o」を使用しています。

image

これは既知の問題でしょうか? 再度再構築すれば修正されると思いますか?

申し訳ありません、問題の原因を見つけました。ご指摘の通り、LLMは管理設定に別の領域を持つようになりました。

Open AI LLMを定義した後、さまざまなAI機能のモデルを選択できるようになりました。

「いいね!」 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.