Does AZURE support tool_resources parameter which is available for Assistant v2

Karishma Nanda 225 Reputation points
2024-05-24T14:53:24.24+00:00

Hi, I am using openai==1.28.1 and while creating assistant I am getting BadRequestError: Error code: 400 - {'error': {'message': "Unknown parameter: 'tool_resources'.", 'type': 'invalid_request_error', 'param': 'tool_resources', 'code': 'unknown_parameter'}} I want to know does Azure support tool_resources functionality which Assistant v2 supports is there a code demo for it. I am taking references from Source source Below is the code which is throwing me error when I am trying tool_resource:

assistant = client.beta.assistants.create(
      instructions='''My Instruction''',
      model="My model deployment name",
      tools=[{"type": "code_interpreter"}],
      tool_resources={"code_interpreter": {"file_ids": [file.id]}}
    )

Below is the code I am getting error TypeError: Assistants.create() got an unexpected keyword argument 'tool_choice'

assistant = client.beta.assistants.create(     
 instructions='''My Instruction''',  
  model="My model deployment name",   
  tools=[{"type": "code_interpreter"}],   
   tool_choice={"code_interpreter": {"file_ids": [file.id]}}    
)
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,482 questions
0 comments No comments
{count} votes

Accepted answer
  1. AshokPeddakotla-MSFT 29,906 Reputation points
    2024-05-27T02:14:08.1266667+00:00

    Karishma Nanda Greetings!

    I want to know does Azure support tool_resources functionality which Assistant v2 supports is there a code demo for it.

    AFAIK, tool_resources is not yet supported.

    Below is the code I am getting error TypeError: Assistants.create() got an unexpected keyword argument 'tool_choice'

    Please create an issue here for further assistance to check if there are any version dependencies.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful