Mutliple Calls request for only one Function at Assistants

Mohamed Hussein 490 Reputation points
2024-12-20T11:58:23.77+00:00

Good Day,

At AOAI Assistants, a system run requires two outputs, while I've only one function (the Bing search)

Is that possible?

Is there a way to limit requirments to only one request, to avoid extra calls and optimize processing times?


{
  "id": "run_45bw9tQ1LeioHY9iUWcaM1b1",
  "object": "thread.run",
  "created_at": 1734695214,
  "assistant_id": "asst_3rY50WWj2cvOXU5jjealB7qy",
  "thread_id": "thread_7j2hL1FVVVLQfi9plDS714to",
  "status": "requires_action",
  "started_at": 1734695222,
  "expires_at": 1734695814,
  "cancelled_at": null,
  "failed_at": null,
  "completed_at": null,
  "required_action": {
    "type": "submit_tool_outputs",
    "submit_tool_outputs": {
      "tool_calls": [
        {
          "id": "call_C9IsWvH2boM1Sce08ykv4zNR",
          "type": "function",
          "function": {
            "name": "search_bing",
            "arguments": "{\"query\": \"Syria December 2024 challenges\"}"
          }
        },
        {
          "id": "call_BlrQ62Mof0ju3zDZRxlOG7XD",
          "type": "function",
          "function": {
            "name": "search_bing",
            "arguments": "{\"query\": \"current situation in Syria December 2024\"}"
          }
        }
      ]
    }
  },
  "last_error": null,
  "model": "gpt-4o-mini",
  "instructions": "You are an assistant designed to help people answer questions. You have access to query the web using Bing Search. You should call bing search whenever a question requires up to date information or could benefit from web data.",
  "tools": [
    {
      "type": "code_interpreter"
    },
    {
      "type": "file_search",
      "file_search": {
        "ranking_options": {
          "ranker": "default_2024_08_21",
          "score_threshold": 0
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "search_bing",
        "description": "Searches bing to get up-to-date information from the web.",
        "parameters": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "The search query"
            }
          },
          "required": [
            "query"
          ]
        },
        "strict": false
      }
    }
  ],
  "tool_resources": {},
  "metadata": {},
  "temperature": 1,
  "top_p": 1,
  "max_completion_tokens": null,
  "max_prompt_tokens": null,
  "truncation_strategy": {
    "type": "last_messages",
    "last_messages": 5
  },
  "incomplete_details": null,
  "usage": null,
  "response_format": "auto",
  "tool_choice": "auto",
  "parallel_tool_calls": true
}
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,449 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.