Cricket fixturesFootball fixtures
  • LIVEICC Men's Cricket World Cup League 2NEDOMAStarts at 09:30 local timeFixtures
  • LIVEIreland tour of Namibia 2026/27NAM316/7IRE81/4 (17.2/50 ov, target 317)Ireland require another 236 runs with 6 wickets and 32.4 overs remainingFixtures
  • LIVEAustralia tour of South Africa 2026/27SA205/3 (45.5 ov)AUSAustralia won the toss and elected to fieldFixtures
  • LIVEAFC Champions League EliteBEI0JHM125'TableFixtures
  • LIVEAFC Champions League EliteRCH0KRE024'TableFixtures
  • UPCOMINGSaudi Pro LeagueABHALFTableFixtures
  • UPCOMINGZimbabwe tour of United Arab Emirates 2026/27AFGZIMFixtures
  • UPCOMINGItalian Serie ASASLAZTableFixtures
  • UPCOMINGItalian Serie AROMACAGTableFixtures
  • UPCOMINGItalian Serie ATORCOMOTableFixtures
  • UPCOMINGWest Indies tour of Bangladesh 2026/27BANWIFixtures
  • UPCOMINGZimbabwe Women tour of India 2026/27IND-WZIM-WFixtures
  • UPCOMINGIndian Super LeagueGOASC DelhiTableFixtures
  • RESULTPakistan ODI Tri-SeriesPAK110SL114/2 (18.1/50 ov, target 111)Sri Lanka won by 8 wickets (with 191 balls remaining)Fixtures
  • RESULTIndia tour of New Zealand 2026/27NZ198/3IND199/4 (13.2/20 ov, target 199)India won by 6 wickets (with 40 balls remaining)Fixtures
  • RESULTSpanish LALIGASevilla2Osasuna0FTTableFixtures
  • RESULTFrench Ligue 1PSG2Lyon0FTTableFixtures
  • LIVEICC Men's Cricket World Cup League 2NEDOMAStarts at 09:30 local timeFixtures
  • LIVEIreland tour of Namibia 2026/27NAM316/7IRE81/4 (17.2/50 ov, target 317)Ireland require another 236 runs with 6 wickets and 32.4 overs remainingFixtures
  • LIVEAustralia tour of South Africa 2026/27SA205/3 (45.5 ov)AUSAustralia won the toss and elected to fieldFixtures
  • LIVECWC Challenge League Group AJERKUWStarts at 09:45 local timeFixtures
  • LIVECWC Challenge League Group APNGQATStarts at 09:45 local timeFixtures
  • LIVENepal Premier LeagueJABKAY109/7 (17.1/20 ov)Janakpur Bolts (NPL) won the toss and elected to fieldFixtures
  • LIVERanji TrophySIKM184NAGA187 & 46/4 (34 ov)Nagaland lead by 49 runs with 6 wickets remainingFixtures
  • LIVERanji TrophyJHK131/4 (47 ov)DELHI515/5dJharkhand trail by 384 runs with 6 wickets remaining in the 1st inningsFixtures
  • LIVERanji TrophyODSA194SVCS13/0 (5 ov)Services trail by 181 runs with 10 wickets remaining in the 1st inningsFixtures
  • LIVERanji TrophyBRODA616J & K6/0 (4 ov)Jammu & Kashmir trail by 610 runs with 10 wickets remaining in the 1st inningsFixtures
  • LIVERanji TrophyCHD685/5dHP49/0 (14 ov)Himachal Pradesh trail by 636 runs with 10 wickets remaining in the 1st inningsFixtures
  • LIVERanji TrophyCGR216/8 (95 ov)AP231Chhattisgarh trail by 15 runs with 2 wickets remaining in the 1st inningsFixtures
  • UPCOMINGZimbabwe tour of United Arab Emirates 2026/27AFGZIMFixtures
  • UPCOMINGWest Indies tour of Bangladesh 2026/27BANWIFixtures
  • UPCOMINGZimbabwe Women tour of India 2026/27IND-WZIM-WFixtures
  • UPCOMINGThe Ford TrophyAUCKCANTFixtures
  • UPCOMINGThe Ford TrophyCDNDFixtures
  • UPCOMINGCWC Challenge League Group ADENQATFixtures
  • UPCOMINGCWC Challenge League Group AKENYAKUWFixtures
  • UPCOMINGNepal Premier LeaguePOASPRFixtures
  • RESULTPakistan ODI Tri-SeriesPAK110SL114/2 (18.1/50 ov, target 111)Sri Lanka won by 8 wickets (with 191 balls remaining)Fixtures
  • RESULTIndia tour of New Zealand 2026/27NZ198/3IND199/4 (13.2/20 ov, target 199)India won by 6 wickets (with 40 balls remaining)Fixtures
  • RESULTNepal Premier LeagueBIK149 (19.3/20 ov, target 158)CHR157/3Chitwan won by 8 runsFixtures
  • RESULTNCL GT20 Canada 2026/27BRB149/5 (16.2/20 ov, target 148)MIS147Blazers won by 5 wickets (with 22 balls remaining)Fixtures
  • RESULTNCL GT20 Canada 2026/27MOW107/9TOK111/5 (18.4/20 ov, target 108)Kings won by 5 wickets (with 8 balls remaining)Fixtures
  • RESULTNepal Premier LeagueLUL88/3 (9.5/20 ov, target 88)SPR87Lumbini won by 7 wickets (with 61 balls remaining)Fixtures
  • LIVEAFC Champions League EliteBEI0JHM125'TableFixtures
  • LIVEAFC Champions League EliteRCH0KRE024'TableFixtures
  • UPCOMINGSaudi Pro LeagueABHALFTableFixtures
  • UPCOMINGItalian Serie ASASLAZTableFixtures
  • UPCOMINGItalian Serie AROMACAGTableFixtures
  • UPCOMINGItalian Serie ATORCOMOTableFixtures
  • UPCOMINGIndian Super LeagueGOASC DelhiTableFixtures
  • UPCOMINGItalian Serie AMilanBolognaTableFixtures
  • UPCOMINGItalian Serie AParmaUdineseTableFixtures
  • UPCOMINGItalian Serie AVeneziaInter MilanTableFixtures
  • RESULTSpanish LALIGASevilla2Osasuna0FTTableFixtures
  • RESULTFrench Ligue 1PSG2Lyon0FTTableFixtures
  • RESULTIndian Super LeagueMohun Bagan1Chennaiyin0FTTableFixtures
  • RESULTAFC Champions League EliteDHC0VIS1FTTableFixtures
  • RESULTAFC Champions League EliteJDT3PORT0FTTableFixtures
  • RESULTAFC Champions League EliteKYO5NEW2FTTableFixtures
Chat GPT

Chat GPT Function Calling Integration

When OpenAI rolled out function calling for ChatGPT API models on June 13, 2023, developers could finally move away from parsing unpredictable natural language. Instead, they started receiving structured JSON…

July 30, 2026
4 min read

When OpenAI rolled out function calling for ChatGPT API models on June 13, 2023, developers could finally move away from parsing unpredictable natural language. Instead, they started receiving structured JSON data directly. This change transformed how applications interact with advanced models, elevating conversational AI from mere text generation to dependable software orchestration.

Chat GPT

1. Initializing the Schema and Parameter Setup

Before executing any model, developers need to define the operations available using specific schema rules. The API accepts JSON Schema format to set up function parameters for function calling integrations, which ensures strict type enforcement for each argument the model generates.

In the November 2023 API update, OpenAI changed “function calling” to “tool calling” in the updated API specification. They replaced the older functions parameter with a flexible tools array. This update lets developers pass multiple execution targets, like custom code routines, external search APIs, and database lookup tools.

As of the official OpenAI API documentation, models like gpt-4, gpt-4-turbo, and gpt-3.5-turbo support function calling. This gives both legacy and modern applications a consistent interface. However, developers need to structure their schemas carefully to prevent execution errors during runtime.

2. Configuring Tool Choice and Execution Flow

To control how the model calls these tools, you’ll need to adjust parameters within the main API payload. The tool_choice parameter accepts values like “auto,” “none,” and “required”. This controls the model’s behavior during function calling, determining whether it decides autonomously, ignores tools, or mandates a specific execution.

When the model chooses to invoke a function, the API response will return a finish_reason of “tool_calls” instead of the usual stop token. Developers can look at this status code to intercept the argument payload, run the local backend logic, and feed the resulting data back into the conversation.

Parameter NameAccepted ValuesPrimary Function
toolsArray of ObjectsDefines available functions and their JSON schemas
tool_choiceauto, none, requiredControls model autonomy when selecting tools
finish_reasontool_calls, stop, lengthIndicates why the model generation terminated

3. Handling Responses and Closing the Loop

To process the model output, you need to validate the returned JSON arguments against your backend expectations before making any changes to the database or API calls. If the parameters align with your schema requirements, you can execute the local function and send back the output message with a role: "tool" attribute to wrap up the conversation.

Structured Outputs: Using modern tool calling protocols cuts down on parser errors compared to older regex extraction methods.

That said, dealing with edge cases where the model generates malformed arguments is essential for engineering teams. Always set up fallback error handling and validation layers to catch any schema discrepancies before passing data downstream.

Conclusion and Next Steps

Implementing structured tool execution can turn simple chatbots into powerful workflow automation agents that interact with live external software. Check out the technical updates on the OpenAI Blog to keep up with upcoming API specification changes and deprecation timelines.

In the future, conversational architectures will rely less on manual schema definitions, focusing more on autonomous runtime discovery. This will help bridge the gap between natural language processing and deterministic software engineering.


FAQs

What models support tool calling?

Tool calling is fully supported across gpt-4, gpt-4-turbo, and gpt-3.5-turbo. Newer multimodal checkpoints like gpt-4o also support function calling, although details on tool calling support for these models are still unconfirmed.

How do I force the model to call a function?

You can set the tool_choice parameter to required or provide a specific object referencing the exact function name you want the model to execute.

What happens if the model generates invalid arguments?

Your backend will fail JSON validation, so you’ll need to return an error message to the model. This way, it can correct its argument generation in the next turn.

Follow us on Google News Get real-time updates & exclusive tech coverage
Follow

Leave a Reply

Your email address will not be published. Required fields are marked *