Files
ragflow/web/src/constants/agent.ts
balibabu 03165a1efa Fix: Fixed the issue where the error prompt box on the Agent page would be covered #3221 (#8992)
### What problem does this PR solve?

Fix: Fixed the issue where the error prompt box on the Agent page would
be covered #3221

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-23 15:09:24 +08:00

27 lines
682 B
TypeScript

export enum ProgrammingLanguage {
Python = 'python',
Javascript = 'javascript',
}
export const CodeTemplateStrMap = {
[ProgrammingLanguage.Python]: `def main(arg1: str, arg2: str) -> str:
return f"result: {arg1 + arg2}"
`,
[ProgrammingLanguage.Javascript]: `const axios = require('axios');
async function main({}) {
try {
const response = await axios.get('https://github.com/infiniflow/ragflow');
return 'Body:' + response.data;
} catch (error) {
return 'Error:' + error.message;
}
}`,
};
export enum AgentGlobals {
SysQuery = 'sys.query',
SysUserId = 'sys.user_id',
SysConversationTurns = 'sys.conversation_turns',
SysFiles = 'sys.files',
}