How does OpenAI Function Calling work?
3-Second Blueprint (English)
- OpenAI function calling never executes code remotely; fine-tuned models inspect tool schemas and return structured JSON arguments.
- Client code maps returned tool names to local Python functions, executes external REST calls, and captures serialized JSON responses.
- Appending tool outputs with matching tool_call_id values to the messages array lets a second LLM pass synthesize the grounded answer.
OpenAI Function CallingPython SDKRequests LibraryOpenWeatherMap APIJSON Tool Schemas
3-Sekunden-Fazit (Deutsch)
- OpenAI Function Calling führt keinen Code selbst aus; das LLM prüft übergebene Schemata und liefert strukturierte JSON-Parameter zurück.
- Die Client-Anwendung ordnet Funktionsnamen lokalen Python-Funktionen zu, ruft externe REST-APIs auf und serialisiert die Antwort.
- Das Anhängen des Ergebnisses samt tool_call_id an das Messages-Array ermöglicht im zweiten API-Aufruf die fundierte Endantwort.
OpenAI Function CallingPython SDKRequests-BibliothekOpenWeatherMap APIJSON-Tool-Schemata
Note / Hinweis: Blueprints are AI-generated educational summaries (0% Politics · 0% Religion · 0% Brainrot) and do not constitute medical, legal, or financial advice. / KI-generierte Zusammenfassung zu Bildungszwecken – ersetzt keine medizinische, rechtliche oder finanzielle Fachberatung.