mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 15:36:50 +08:00
### 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)
27 lines
682 B
TypeScript
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',
|
|
}
|