mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-03 22:30:31 +08:00
27 lines
640 B
TypeScript
27 lines
640 B
TypeScript
|
|
export enum ProgrammingLanguage {
|
||
|
|
Python = 'python',
|
||
|
|
Javascript = 'javascript',
|
||
|
|
}
|
||
|
|
|
||
|
|
export const CodeTemplateStrMap = {
|
||
|
|
[ProgrammingLanguage.Python]: `
|
||
|
|
def main(arg1: str, arg2: str) -> dict:
|
||
|
|
return {
|
||
|
|
"result": arg1 + arg2,
|
||
|
|
}
|
||
|
|
`,
|
||
|
|
[ProgrammingLanguage.Javascript]: `
|
||
|
|
const axios = require('axios');
|
||
|
|
async function main(args) {
|
||
|
|
try {
|
||
|
|
const response = await axios.get('https://github.com/infiniflow/ragflow');
|
||
|
|
console.log('Body:', response.data);
|
||
|
|
} catch (error) {
|
||
|
|
console.error('Error:', error.message);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = { main };
|
||
|
|
`,
|
||
|
|
};
|