Slide 20
Slide 20 text
Creating Tools from existing code
TypeScript + Python
LangChain
\ OpenAi
for Python
Pydantic
"Manual" AST Parsing
[...]
const className = node.name.text;
const classDoc = getDocumentation(node, checker);
const methods = node.members
.filter(isMethodDeclaration)
.filter(getPublic)
.filter(method => tsGetDecorator(method)?.some(decorator => decorator.getText() === '@AiTool'))
.map(method => parseMethod(method, sourceFile, checker));
return methods.map(method => ({
type: 'function',
className,
classDocumentation: classDoc ?? '',
function: method,
}));
[...]
App Automation with LLMS & Generative AI
Session
@MaxOSchulte | Thinktecture AG 20