fix ask-ai prompt userdata
This commit is contained in:
@ -125,7 +125,7 @@ export default function CommentForm({ user, agent, onCommentPosted }) {
|
|||||||
disabled={loading || !text.trim()}
|
disabled={loading || !text.trim()}
|
||||||
className={`btn ${loading ? 'btn-outline' : 'btn-primary'}`}
|
className={`btn ${loading ? 'btn-outline' : 'btn-primary'}`}
|
||||||
>
|
>
|
||||||
{loading ? 'posting...' : 'post comment'}
|
{loading ? 'posting...' : 'post'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -25,8 +25,12 @@ export function useAskAI(adminData, userProfile, agent) {
|
|||||||
try {
|
try {
|
||||||
logger.log('Sending question to Ollama:', question)
|
logger.log('Sending question to Ollama:', question)
|
||||||
|
|
||||||
|
// ユーザー情報を含むシステムプロンプトを構築
|
||||||
|
const userInfo = userProfile ? `相手の名前は${userProfile.displayName || userProfile.handle}です。` : ''
|
||||||
|
const enhancedSystemPrompt = `${aiConfig.systemPrompt} ${userInfo}`
|
||||||
|
|
||||||
// Ollamaに直接リクエスト送信(oauth_oldと同じ方式)
|
// Ollamaに直接リクエスト送信(oauth_oldと同じ方式)
|
||||||
const prompt = `${aiConfig.systemPrompt}
|
const prompt = `${enhancedSystemPrompt}
|
||||||
|
|
||||||
Question: ${question}
|
Question: ${question}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user