# Function calling, mutiple argument

**URL:** <https://community.openai.com/t/function-calling-mutiple-argument/1139457>\
**Category:** API\
**Tags:** function-calling\
**Created:** [March 10, 2025, 1:00am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457 "2025-03-10T01:00:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 10, 2025, 1:00am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/1 "2025-03-10T01:00:06Z")

</div>

Hello,

I am currently developing a service similar to Airbnb. I have some questions regarding integrating external services using OpenAI function calling.

1. OpenAI does not recognize the word “currently.” For example, in Korea, today is March 10, 2025. However, when I ask OpenAI, “What’s today’s date?” it responds with an incorrect answer, such as “October 11, 2023.”  
To solve this, I implemented a function calling logic that provides today’s date. However, I later realized that function calling only allows a single function to be invoked per call, which prevents another function (for searching accommodations) from being executed.
2. When I input the sentence:  
3.\*“Find me a room for 2 ppl, 2 weeks from now for a month near NY university”\*\*  
I want OpenAI to extract the arguments: **now, 2 weeks, 2 ppl, and NY university**.  
In this case, how should I structure multiple function calls to handle this properly?

I need to invoke both `get_today` and `get_airbnb_api` functions simultaneously—one to provide OpenAI with today’s date and the other to process the extracted arguments through function calling on the server. However, I am struggling to figure out how to implement this.

Thank you for reading.

---

<div class="post-metadata">

**Author:** ![Diet](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/diet/32/562749_2.png) [@Diet](https://community.openai.com/u/Diet)\
**Post date:** [March 10, 2025, 4:06am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/2 "2025-03-10T04:06:58Z")

</div>

Hi!

It’s pretty common practice to insert the call’s date (and perhaps time) dynamically into the system prompt or something.

Regarding multiple functions:

I guess we need to distinguish between parallel and sequential function calling.

There’s nothing inherently preventing multiple function calls being sent off in one go. If you use a more limited function interface, you might need to make use of the command/dispatcher pattern, but there’s nothing really stopping you.

But if the result of one function is needed as the input of another function, you can’t call stuff in parallel.

But there’s also nothing stopping you from having functions called in sequence. If you insert the function response into your chat, assuming proper prompting, the model will then call the next logical function in your workflow.

> 3.\*“Find me a room for 2 ppl, 2 weeks from now for a month near NY university”\*\*

I don’t know if you need multiple function calls for this.

If your function signature looks like

```typescript
{
   start: string, // accepts "MMMM D, YYYY", "x days from today"
   duration?: string, // accepts "x days", "x weeks", must be set if end isn't set
   end?: string, // accepts "MMMM D, YYYY", "x days from today", must be set if duration isn't set
   location: string // where the user wants to go
}

```

you can just pluck the details apart in your program. The model should just be instructed to gather all necessary information before sending it off.

Does that help?

---

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 10, 2025, 4:33am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/4 "2025-03-10T04:33:53Z")

</div>

thank you for answer. and very helpful

umm… this is my function

{  
“name”: “get\_today”,  
“description”: “Check the current date or provide specific date information. If the word “tomorrow” is entered, calculate and provide the information based on today’s date”,  
“parameters”: {  
“type”: “object”,  
“properties”: {  
“day”: {  
“type”: “string”,  
“description”: “The specific date to check. If empty, return today’s date. Example formats: ‘YYYY-MM-DD’, ‘today’, ‘tomorrow’, ‘yesterday’.”  
}  
},  
“required”: [  
“day”  
]  
}  
}

“get\_enkor\_airbnb”: {  
“name”: “get\_enkor\_airbnb”,  
“description”: “Provide information if words such as “accommodation,” “lodging,” “reservation,” or “hotel search” are included”,  
“parameters”: {  
“type”: “object”,  
“properties”: {  
“livingType”: {  
“type”: “string”,  
“description”: “ex. private, coliving, both”  
},  
“houseType”: {  
“type”: “string”,  
“description”: “ex. studio, flat, enkorplex, hotel, communityLiving”  
},  
“checkInDate”: {  
“type”: “string”,  
“description”: “ex. 2024-12-05”  
},  
“checkOutDate”: {  
“type”: “string”,  
“description”: “ex. 2025-01-14”  
},  
“universities”: {  
“type”: “string”,  
“description”: “ex. yonsei, ewha”  
},  
“subway”: {  
“type”: “string”,  
“description”: “ex. 4122, 2735”  
},  
“guest”: {  
“type”: “integer”,  
“description”: “guest”  
},  
“enGu”: {  
“type”: “string”,  
“description”: “ex. Gwanak-gu, Gwangjin-gu”  
}  
},  
“required”:   
}  
}  
}

`get_today` is a function I created because OpenAI does not properly recognize words like “today,” “tomorrow,” “now,” etc., so it provides the correct date information.

`get_airbnb` is a function that retrieves accommodation information.

For example, if I ask OpenAI Assistant what today’s date is, it responds with an incorrect date.

That’s why I thought multiple function calls would be necessary.

I don’t think this logic can be handled with a single function call.

Am I wrong in thinking this?

---

<div class="post-metadata">

**Author:** ![Diet](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/diet/32/562749_2.png) [@Diet](https://community.openai.com/u/Diet)\
**Post date:** [March 10, 2025, 4:45am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/5 "2025-03-10T04:45:31Z")

</div>

> [@ms1993](#):
>
> `get_today` is a function I created because OpenAI does not properly recognize words like “today,” “tomorrow,” “now,” etc., so it provides the correct date information.

 ![A chat interface shows a futuristic scenario where a system message explains a revamped calendar; the date is September 77th, 2187, and tomorrow is September 78th, 2187. (Captioned by AI)](https://us1.discourse-cdn.com/openai1/original/4X/8/4/2/842aff7ec181992e19eae78a1cd5966a1a19e381.png)

🤔

---

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 10, 2025, 6:16am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/6 "2025-03-10T06:16:02Z")

</div>

I already know that and have tried it before.

But there’s a problem.

When I ask for today’s date, it correctly responds with **September 77th, 2187**.

However, when I ask the same question the next day, it still responds with **September 77th, 2187**.

OpenAI doesn’t recognize that time has passed.

---

<div class="post-metadata">

**Author:** ![Diet](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/diet/32/562749_2.png) [@Diet](https://community.openai.com/u/Diet)\
**Post date:** [March 10, 2025, 6:28am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/7 "2025-03-10T06:28:25Z")

</div>

well yes, you have to swap out the system message with every request (or at least if the conversation goes stale)

---

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 10, 2025, 7:39am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/8 "2025-03-10T07:39:02Z")

</div>

To avoid modifying the system message with every request, I created a function called `get_today` on the application server and designed the assistant to respond with the time using function calling.

However, after implementing this, other functions are not being called, so I’m considering multiple function calling, but it’s proving to be more challenging than I expected.

Thanks for your response!

---

<div class="post-metadata">

**Author:** ![sps](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/sps/32/7736_2.png) [@sps](https://community.openai.com/u/sps)\
**Post date:** [March 10, 2025, 7:43am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/9 "2025-03-10T07:43:22Z")

</div>

Echoing @diet, it’s much simpler, faster, and more economical to have a system message with the current datetime than having the model call a function to fetch it.

---

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 10, 2025, 9:44am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/10 "2025-03-10T09:44:12Z")

</div>

So, does that mean it’s more economical and faster to update the system message every day when the date changes?

I should look for a way to automate that.

Thanks for your input!

---

<div class="post-metadata">

**Author:** ![sps](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/sps/32/7736_2.png) [@sps](https://community.openai.com/u/sps)\
**Post date:** [March 10, 2025, 5:12pm UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/11 "2025-03-10T17:12:46Z")

</div>

You can update the system message with the current datetime just before making a chat completion call. There’s no need to complicate things.

---

<div class="post-metadata">

**Author:** ![ms1993](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ms1993/32/548209_2.png) [@ms1993](https://community.openai.com/u/ms1993)\
**Post date:** [March 12, 2025, 1:32am UTC](https://community.openai.com/t/function-calling-mutiple-argument/1139457/12 "2025-03-12T01:32:32Z")

</div>

Thank you for your feedback. As you mentioned, updating the system message for each chat completion request is the way to go.
