# Function Calls is repeated unnecessary

**URL:** <https://community.openai.com/t/function-calls-is-repeated-unnecessary/548189>\
**Category:** API\
**Tags:** function-calling\
**Created:** [December 7, 2023, 3:23pm UTC](https://community.openai.com/t/function-calls-is-repeated-unnecessary/548189 "2023-12-07T15:23:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [December 7, 2023, 3:53pm UTC](https://community.openai.com/t/function-calls-is-repeated-unnecessary/548189/3 "2023-12-07T15:53:02Z")

</div>

The AI needs complete conversation history of what it has written and the function returns it has received, at the minimum since the last time it has replied directly to the user.

> [@Bad results when using fine-tuned model with function calling](https://community.openai.com/t/bad-results-when-using-fine-tuned-model-with-function-calling/428832/8):
>
> Hey folks. I’m about to show how to properly insert your function return back to the AI - something far too useful for OpenAI to document properly. chat\_completion\_parameters = { "model": "gpt-3.5-turbo", "top\_p": 0.5, "messages": [ {"role": "system", "content": "You are MegaBot, my fine-tune AI identity."}, # chat history goes here {"role": "user", "content": "Who won the 2024 election?"}, {"role": "assistant", "content": assistant\_content\_if\_exist, "function\_call": { "name": called\_functi…

If you make an AI that forgets the previous function, it doesn’t know why someone is wanting to go to the beach, and it still looks like the weather is unknown.

---

_[View the full topic](https://community.openai.com/t/function-calls-is-repeated-unnecessary/548189)._
