class_docstr: (In preview) A class for generic conversable agents which can be configured as assistant or user proxy.
  
  After receiving each message, the agent will send a reply to the sender unless the msg is a termination msg.
  For example, AssistantAgent and UserProxyAgent are subclasses of this class,
  configured with different default settings.
  
  To modify auto reply, override `generate_reply` method.
  To disable/enable human response in every turn, set `human_input_mode` to "NEVER" or "ALWAYS".
  To modify the way to get human input, override `get_human_input` method.
  To modify the way to execute code blocks, single code block, or function call, override `execute_code_blocks`,
  `run_code`, and `execute_function` methods respectively.
  To customize the initial message when a conversation starts, override `generate_init_message` method.
class_docstr_tok: ["(","In","preview",")","A","class","for","generic","conversable","agents","which","can","be","configured","as","assistant","or","user","proxy",".","After","receiving","each","message",",","the","agent","will","send","a","reply","to","the","sender","unless","the","msg","is","a","termination","msg",".","For","example",",","AssistantAgent","and","UserProxyAgent","are","subclasses","of","this","class",",","configured","with","different","default","settings",".","To","modify","auto","reply",",","override","`","generate_reply","`","method",".","To","disable\/enable","human","response","in","every","turn",",","set","`","human_input_mode","`","to","``","NEVER","''","or","``","ALWAYS","''",".","To","modify","the","way","to","get","human","input",",","override","`","get_human_input","`","method",".","To","modify","the","way","to","execute","code","blocks",",","single","code","block",",","or","function","call",",","override","`","execute_code_blocks","`",",","`","run_code","`",",","and","`","execute_function","`","methods","respectively",".","To","customize","the","initial","message","when","a","conversation","starts",",","override","`","generate_init_message","`","method","."]
docstr: update a function_signature in the LLM configuration for function_call.
  
  Args:
      func_sig (str or dict): description/name of the function to update/remove to the model. See: https://platform.openai.com/docs/api-reference/chat/create#chat/create-functions
      is_remove: whether removing the function from llm_config with name 'func_sig'
  
  Deprecated as of [OpenAI API v1.1.0](https://github.com/openai/openai-python/releases/tag/v1.1.0)
  See https://platform.openai.com/docs/api-reference/chat/create#chat-create-function_call
docstr_tok: ["update","a","function_signature","in","the","LLM","configuration","for","function_call",".","Args",":","func_sig","(","str","or","dict",")",":","description\/name","of","the","function","to","update\/remove","to","the","model",".","See",":","https",":","\/\/platform.openai.com\/docs\/api-reference\/chat\/create","#","chat\/create-functions","is_remove",":","whether","removing","the","function","from","llm_config","with","name","'func_sig'","Deprecated","as","of","[","OpenAI","API","v1.1.0","]","(","https",":","\/\/github.com\/openai\/openai-python\/releases\/tag\/v1.1.0",")","See","https",":","\/\/platform.openai.com\/docs\/api-reference\/chat\/create","#","chat-create-function_call"]
code: def update_function_signature(
      self, func_sig: Union[str, Dict], is_remove: None
  ):
      """update a function_signature in the LLM configuration for function_call.
  
      Args:
          func_sig (str or dict): description/name of the function to update/remove to the model. See: https://platform.openai.com/docs/api-reference/chat/create#chat/create-functions
          is_remove: whether removing the function from llm_config with name 'func_sig'
  
      Deprecated as of [OpenAI API v1.1.0](https://github.com/openai/openai-python/releases/tag/v1.1.0)
      See https://platform.openai.com/docs/api-reference/chat/create#chat-create-function_call
      """
  
      if not isinstance(self.llm_config, dict):
          error_msg = "To update a function signature, agent must have an llm_config"
          logger.error(error_msg)
          raise AssertionError(error_msg)
  
      if is_remove:
          if "functions" not in self.llm_config.keys():
              error_msg = "The agent config doesn't have function {name}.".format(
                  name=func_sig
              )
              logger.error(error_msg)
              raise AssertionError(error_msg)
          else:
              self.llm_config["functions"] = [
                  func
                  for func in self.llm_config["functions"]
                  if func["name"] != func_sig
              ]
      else:
          self._assert_valid_name(func_sig["name"])
          if "functions" in self.llm_config.keys():
              self.llm_config["functions"] = [
                  func
                  for func in self.llm_config["functions"]
                  if func.get("name") != func_sig["name"]
              ] + [func_sig]
          else:
              self.llm_config["functions"] = [func_sig]
  
      if len(self.llm_config["functions"]) == 0:
          del self.llm_config["functions"]
  
      self.client = OpenAIWrapper(**self.llm_config)
  
imports: import asyncio
  import copy
  import functools
  import inspect
  import json
  import logging
  import re
  from collections import defaultdict
  from typing import Any, Awaitable, Callable, Dict, List, Literal, Optional, Tuple, Type, TypeVar, Union
  from ..None import OpenAIWrapper
  from ..code_utils import DEFAULT_MODEL, UNKNOWN, content_str, execute_code, extract_code, infer_lang
  from ..function_utils import get_function_schema, load_basemodels_if_needed, serialize_to_str
  from .agent import Agent
  from .._pydantic import model_dump
label_desc: Use image node_id 40 for calling the ConversableAgent obj's underlying member method code with example usage: obj.update_function_signature(func_sig, is_remove) without return types