in azure/functions/decorators/function_app.py [0:0]
def assistant_post_input(self, arg_name: str,
id: str,
user_message: str,
model: Optional[str] = None,
chat_storage_connection_setting: Optional[str] = "AzureWebJobsStorage", # noqa: E501
collection_name: Optional[str] = "ChatState", # noqa: E501
data_type: Optional[
Union[DataType, str]] = None,
**kwargs) \
-> Callable[..., Any]:
"""
The assistantPost output binding sends a message to the assistant and
saves the response in its internal state.
:param arg_name: The name of binding parameter in the function code.
:param id: The ID of the assistant to update.
:param user_message: The user message that user has entered for
assistant to respond to.
:param model: The OpenAI chat model to use.
:param chat_storage_connection_setting: The configuration section name
for the table settings for assistant chat storage. The default value is
"AzureWebJobsStorage".
:param collection_name: The table collection name for assistant chat
storage. The default value is "ChatState".
:param data_type: Defines how Functions runtime should treat the
parameter value
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json
:return: Decorator function.
"""
@self._configure_function_builder
def wrap(fb):
def decorator():
fb.add_binding(
binding=AssistantPostInput(
name=arg_name,
id=id,
user_message=user_message,
model=model,
chat_storage_connection_setting=chat_storage_connection_setting, # noqa: E501
collection_name=collection_name,
data_type=parse_singular_param_to_enum(data_type,
DataType),
**kwargs))
return fb
return decorator()
return wrap