Brain-Score 85/100 TECH Learn Data with Mark · 5:22

How does OpenAI Function Calling work?

3-Second Blueprint (English)

  1. OpenAI function calling never executes code remotely; fine-tuned models inspect tool schemas and return structured JSON arguments.
  2. Client code maps returned tool names to local Python functions, executes external REST calls, and captures serialized JSON responses.
  3. 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)

  1. OpenAI Function Calling führt keinen Code selbst aus; das LLM prüft übergebene Schemata und liefert strukturierte JSON-Parameter zurück.
  2. Die Client-Anwendung ordnet Funktionsnamen lokalen Python-Funktionen zu, ruft externe REST-APIs auf und serialisiert die Antwort.
  3. 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.