This JavaScript guide demonstrates the basics of E2B: connecting to an LLM, generating Python code, and executing it securely in an E2B sandbox.
Function calling allows you to more reliably get structured data back from the model. For example, you can:
Create chatbots that answer questions by calling external APIs (e.g. like ChatGPT Plugins)
e.g. define functions like send_email(to: string, body: string), or get_current_weather(location: string, unit: 'celsius' | 'fahrenheit')
Convert natural language into API calls
e.g. convert "Who are my top customers?" to get_customers(min_revenue: int, created_before: string, limit: int) and call your internal API
Extract structured data from text
e.g. define a function called extract_data(name: string, birthday: string), or sql_query(query: string)