@@ -1694,7 +1694,6 @@ def assistant_skill_trigger(self,
1694
1694
function_description : str ,
1695
1695
function_name : Optional [str ] = None ,
1696
1696
parameter_description_json : Optional [str ] = None , # NoQA
1697
- model : Optional [OpenAIModels ] = OpenAIModels .DefaultChatModel , # NoQA
1698
1697
data_type : Optional [
1699
1698
Union [DataType , str ]] = None ,
1700
1699
** kwargs : Any ) -> Callable [..., Any ]:
@@ -1723,7 +1722,6 @@ def assistant_skill_trigger(self,
1723
1722
:param parameter_description_json: A JSON description of the function
1724
1723
parameter, which is provided to the LLM.
1725
1724
If no description is provided, the description will be autogenerated.
1726
- :param model: The OpenAI chat model to use.
1727
1725
:param data_type: Defines how Functions runtime should treat the
1728
1726
parameter value.
1729
1727
:param kwargs: Keyword arguments for specifying additional binding
@@ -1741,7 +1739,6 @@ def decorator():
1741
1739
function_description = function_description ,
1742
1740
function_name = function_name ,
1743
1741
parameter_description_json = parameter_description_json ,
1744
- model = model ,
1745
1742
data_type = parse_singular_param_to_enum (data_type ,
1746
1743
DataType ),
1747
1744
** kwargs ))
@@ -3220,10 +3217,13 @@ def decorator():
3220
3217
def text_completion_input (self ,
3221
3218
arg_name : str ,
3222
3219
prompt : str ,
3223
- model : Optional [OpenAIModels ] = OpenAIModels .DefaultChatModel , # NoQA
3220
+ chat_model : Optional
3221
+ [Union [str , OpenAIModels ]]
3222
+ = OpenAIModels .DefaultChatModel ,
3224
3223
temperature : Optional [str ] = "0.5" ,
3225
3224
top_p : Optional [str ] = None ,
3226
3225
max_tokens : Optional [str ] = "100" ,
3226
+ is_reasoning_model : Optional [bool ] = False ,
3227
3227
data_type : Optional [Union [DataType , str ]] = None ,
3228
3228
** kwargs ) \
3229
3229
-> Callable [..., Any ]:
@@ -3243,7 +3243,10 @@ def text_completion_input(self,
3243
3243
:param arg_name: The name of binding parameter in the function code.
3244
3244
:param prompt: The prompt to generate completions for, encoded as a
3245
3245
string.
3246
- :param model: the ID of the model to use.
3246
+ :param model: @deprecated. Use chat_model instead. The model parameter
3247
+ is unused and will be removed in future versions.
3248
+ :param chat_model: The deployment name or model name of OpenAI Chat
3249
+ Completion API. The default value is "gpt-3.5-turbo".
3247
3250
:param temperature: The sampling temperature to use, between 0 and 2.
3248
3251
Higher values like 0.8 will make the output more random, while lower
3249
3252
values like 0.2 will make it more focused and deterministic.
@@ -3255,7 +3258,10 @@ def text_completion_input(self,
3255
3258
:param max_tokens: The maximum number of tokens to generate in the
3256
3259
completion. The token count of your prompt plus max_tokens cannot
3257
3260
exceed the model's context length. Most models have a context length of
3258
- 2048 tokens (except for the newest models, which support 4096).
3261
+ 2048 tokens (except for the newest models, which support 4096)
3262
+ :param is_reasoning_model: Whether the configured chat completion model
3263
+ is a reasoning model or not. Properties max_tokens and temperature are not
3264
+ supported for reasoning models.
3259
3265
:param data_type: Defines how Functions runtime should treat the
3260
3266
parameter value
3261
3267
:param kwargs: Keyword arguments for specifying additional binding
@@ -3271,10 +3277,11 @@ def decorator():
3271
3277
binding = TextCompletionInput (
3272
3278
name = arg_name ,
3273
3279
prompt = prompt ,
3274
- model = model ,
3280
+ chat_model = chat_model ,
3275
3281
temperature = temperature ,
3276
3282
top_p = top_p ,
3277
3283
max_tokens = max_tokens ,
3284
+ is_reasoning_model = is_reasoning_model ,
3278
3285
data_type = parse_singular_param_to_enum (data_type ,
3279
3286
DataType ),
3280
3287
** kwargs ))
@@ -3371,9 +3378,15 @@ def decorator():
3371
3378
def assistant_post_input (self , arg_name : str ,
3372
3379
id : str ,
3373
3380
user_message : str ,
3374
- model : Optional [str ] = None ,
3381
+ chat_model : Optional
3382
+ [Union [str , OpenAIModels ]]
3383
+ = OpenAIModels .DefaultChatModel ,
3375
3384
chat_storage_connection_setting : Optional [str ] = "AzureWebJobsStorage" , # noqa: E501
3376
- collection_name : Optional [str ] = "ChatState" , # noqa: E501
3385
+ collection_name : Optional [str ] = "ChatState" , # noqa: E501
3386
+ temperature : Optional [str ] = "0.5" ,
3387
+ top_p : Optional [str ] = None ,
3388
+ max_tokens : Optional [str ] = "100" ,
3389
+ is_reasoning_model : Optional [bool ] = False ,
3377
3390
data_type : Optional [
3378
3391
Union [DataType , str ]] = None ,
3379
3392
** kwargs ) \
@@ -3386,12 +3399,30 @@ def assistant_post_input(self, arg_name: str,
3386
3399
:param id: The ID of the assistant to update.
3387
3400
:param user_message: The user message that user has entered for
3388
3401
assistant to respond to.
3389
- :param model: The OpenAI chat model to use.
3402
+ :param model: @deprecated. Use chat_model instead. The model parameter
3403
+ is unused and will be removed in future versions.
3404
+ :param chat_model: The deployment name or model name of OpenAI Chat
3405
+ Completion API. The default value is "gpt-3.5-turbo".
3390
3406
:param chat_storage_connection_setting: The configuration section name
3391
3407
for the table settings for assistant chat storage. The default value is
3392
3408
"AzureWebJobsStorage".
3393
3409
:param collection_name: The table collection name for assistant chat
3394
3410
storage. The default value is "ChatState".
3411
+ :param temperature: The sampling temperature to use, between 0 and 2.
3412
+ Higher values like 0.8 will make the output more random, while lower
3413
+ values like 0.2 will make it more focused and deterministic.
3414
+ :param top_p: An alternative to sampling with temperature, called
3415
+ nucleus sampling, where the model considers the results of the tokens
3416
+ with top_p probability mass. So 0.1 means only the tokens comprising
3417
+ the top 10% probability mass are considered. It's generally recommend
3418
+ to use this or temperature
3419
+ :param max_tokens: The maximum number of tokens to generate in the
3420
+ completion. The token count of your prompt plus max_tokens cannot
3421
+ exceed the model's context length. Most models have a context length of
3422
+ 2048 tokens (except for the newest models, which support 4096)
3423
+ :param is_reasoning_model: Whether the configured chat completion model
3424
+ is a reasoning model or not. Properties max_tokens and temperature are
3425
+ not supported for reasoning models.
3395
3426
:param data_type: Defines how Functions runtime should treat the
3396
3427
parameter value
3397
3428
:param kwargs: Keyword arguments for specifying additional binding
@@ -3408,9 +3439,13 @@ def decorator():
3408
3439
name = arg_name ,
3409
3440
id = id ,
3410
3441
user_message = user_message ,
3411
- model = model ,
3442
+ chat_model = chat_model ,
3412
3443
chat_storage_connection_setting = chat_storage_connection_setting , # noqa: E501
3413
3444
collection_name = collection_name ,
3445
+ temperature = temperature ,
3446
+ top_p = top_p ,
3447
+ max_tokens = max_tokens ,
3448
+ is_reasoning_model = is_reasoning_model ,
3414
3449
data_type = parse_singular_param_to_enum (data_type ,
3415
3450
DataType ),
3416
3451
** kwargs ))
@@ -3424,7 +3459,9 @@ def embeddings_input(self,
3424
3459
arg_name : str ,
3425
3460
input : str ,
3426
3461
input_type : InputType ,
3427
- model : Optional [str ] = None ,
3462
+ embeddings_model : Optional
3463
+ [Union [str , OpenAIModels ]]
3464
+ = OpenAIModels .DefaultEmbeddingsModel ,
3428
3465
max_chunk_length : Optional [int ] = 8 * 1024 ,
3429
3466
max_overlap : Optional [int ] = 128 ,
3430
3467
data_type : Optional [
@@ -3441,7 +3478,10 @@ def embeddings_input(self,
3441
3478
:param input: The input source containing the data to generate
3442
3479
embeddings for.
3443
3480
:param input_type: The type of the input.
3444
- :param model: The ID of the model to use.
3481
+ :param model: @deprecated. Use embeddings_model instead. The model
3482
+ parameter is unused and will be removed in future versions.
3483
+ :param embeddings_model: The deployment name or model name for OpenAI
3484
+ Embeddings. The default value is "text-embedding-ada-002".
3445
3485
:param max_chunk_length: The maximum number of characters to chunk the
3446
3486
input into. Default value: 8 * 1024
3447
3487
:param max_overlap: The maximum number of characters to overlap
@@ -3462,7 +3502,7 @@ def decorator():
3462
3502
name = arg_name ,
3463
3503
input = input ,
3464
3504
input_type = input_type ,
3465
- model = model ,
3505
+ embeddings_model = embeddings_model ,
3466
3506
max_chunk_length = max_chunk_length ,
3467
3507
max_overlap = max_overlap ,
3468
3508
data_type = parse_singular_param_to_enum (data_type ,
@@ -3476,13 +3516,21 @@ def decorator():
3476
3516
3477
3517
def semantic_search_input (self ,
3478
3518
arg_name : str ,
3479
- connection_name : str ,
3519
+ search_connection_name : str ,
3480
3520
collection : str ,
3481
3521
query : Optional [str ] = None ,
3482
- embeddings_model : Optional [OpenAIModels ] = OpenAIModels .DefaultEmbeddingsModel , # NoQA
3483
- chat_model : Optional [OpenAIModels ] = OpenAIModels .DefaultChatModel , # NoQA
3522
+ embeddings_model : Optional
3523
+ [Union [str , OpenAIModels ]]
3524
+ = OpenAIModels .DefaultEmbeddingsModel ,
3525
+ chat_model : Optional
3526
+ [Union [str , OpenAIModels ]]
3527
+ = OpenAIModels .DefaultChatModel ,
3484
3528
system_prompt : Optional [str ] = semantic_search_system_prompt , # NoQA
3485
3529
max_knowledge_count : Optional [int ] = 1 ,
3530
+ temperature : Optional [str ] = "0.5" ,
3531
+ top_p : Optional [str ] = None ,
3532
+ max_tokens : Optional [str ] = "100" ,
3533
+ is_reasoning_model : Optional [bool ] = False ,
3486
3534
data_type : Optional [
3487
3535
Union [DataType , str ]] = None ,
3488
3536
** kwargs ) \
@@ -3499,19 +3547,34 @@ def semantic_search_input(self,
3499
3547
Ref: https://platform.openai.com/docs/guides/embeddings
3500
3548
3501
3549
:param arg_name: The name of binding parameter in the function code.
3502
- :param connection_name : app setting or environment variable which
3503
- contains a connection string value.
3550
+ :param search_connection_name : app setting or environment variable
3551
+ which contains a vector search connection setting value.
3504
3552
:param collection: The name of the collection or table to search or
3505
3553
store.
3506
3554
:param query: The semantic query text to use for searching.
3507
- :param embeddings_model: The ID of the model to use for embeddings.
3508
- The default value is "text-embedding-ada-002".
3509
- :param chat_model: The name of the Large Language Model to invoke for
3510
- chat responses . The default value is "gpt-3.5-turbo".
3555
+ :param embeddings_model: The deployment name or model name for OpenAI
3556
+ Embeddings. The default value is "text-embedding-ada-002".
3557
+ :param chat_model: The deployment name or model name of OpenAI Chat
3558
+ Completion API . The default value is "gpt-3.5-turbo".
3511
3559
:param system_prompt: Optional. The system prompt to use for prompting
3512
3560
the large language model.
3513
3561
:param max_knowledge_count: Optional. The number of knowledge items to
3514
3562
inject into the SystemPrompt. Default value: 1
3563
+ :param temperature: The sampling temperature to use, between 0 and 2.
3564
+ Higher values like 0.8 will make the output more random, while lower
3565
+ values like 0.2 will make it more focused and deterministic.
3566
+ :param top_p: An alternative to sampling with temperature, called
3567
+ nucleus sampling, where the model considers the results of the tokens
3568
+ with top_p probability mass. So 0.1 means only the tokens comprising
3569
+ the top 10% probability mass are considered. It's generally recommend
3570
+ to use this or temperature
3571
+ :param max_tokens: The maximum number of tokens to generate in the
3572
+ completion. The token count of your prompt plus max_tokens cannot
3573
+ exceed the model's context length. Most models have a context length of
3574
+ 2048 tokens (except for the newest models, which support 4096)
3575
+ :param is_reasoning_model: Whether the configured chat completion model
3576
+ is a reasoning model or not. Properties max_tokens and temperature are
3577
+ not supported for reasoning models.
3515
3578
:param data_type: Optional. Defines how Functions runtime should treat
3516
3579
the parameter value. Default value: None
3517
3580
:param kwargs: Keyword arguments for specifying additional binding
@@ -3526,13 +3589,17 @@ def decorator():
3526
3589
fb .add_binding (
3527
3590
binding = SemanticSearchInput (
3528
3591
name = arg_name ,
3529
- connection_name = connection_name ,
3592
+ search_connection_name = search_connection_name ,
3530
3593
collection = collection ,
3531
3594
query = query ,
3532
3595
embeddings_model = embeddings_model ,
3533
3596
chat_model = chat_model ,
3534
3597
system_prompt = system_prompt ,
3535
3598
max_knowledge_count = max_knowledge_count ,
3599
+ temperature = temperature ,
3600
+ top_p = top_p ,
3601
+ max_tokens = max_tokens ,
3602
+ is_reasoning_model = is_reasoning_model ,
3536
3603
data_type = parse_singular_param_to_enum (data_type ,
3537
3604
DataType ),
3538
3605
** kwargs ))
@@ -3546,9 +3613,11 @@ def embeddings_store_output(self,
3546
3613
arg_name : str ,
3547
3614
input : str ,
3548
3615
input_type : InputType ,
3549
- connection_name : str ,
3616
+ store_connection_name : str ,
3550
3617
collection : str ,
3551
- model : Optional [OpenAIModels ] = OpenAIModels .DefaultEmbeddingsModel , # NoQA
3618
+ embeddings_model : Optional
3619
+ [Union [str , OpenAIModels ]]
3620
+ = OpenAIModels .DefaultEmbeddingsModel ,
3552
3621
max_chunk_length : Optional [int ] = 8 * 1024 ,
3553
3622
max_overlap : Optional [int ] = 128 ,
3554
3623
data_type : Optional [
@@ -3568,10 +3637,13 @@ def embeddings_store_output(self,
3568
3637
:param arg_name: The name of binding parameter in the function code.
3569
3638
:param input: The input to generate embeddings for.
3570
3639
:param input_type: The type of the input.
3571
- :param connection_name : The name of an app setting or environment
3572
- variable which contains a connection string value
3640
+ :param store_connection_name : The name of an app setting or environment
3641
+ variable which contains a vectore store connection setting value
3573
3642
:param collection: The collection or table to search.
3574
- :param model: The ID of the model to use.
3643
+ :param model: @deprecated. Use embeddings_model instead. The model
3644
+ parameter is unused and will be removed in future versions.
3645
+ :param embeddings_model: The deployment name or model name for OpenAI
3646
+ Embeddings. The default value is "text-embedding-ada-002".
3575
3647
:param max_chunk_length: The maximum number of characters to chunk the
3576
3648
input into.
3577
3649
:param max_overlap: The maximum number of characters to overlap between
@@ -3592,9 +3664,9 @@ def decorator():
3592
3664
name = arg_name ,
3593
3665
input = input ,
3594
3666
input_type = input_type ,
3595
- connection_name = connection_name ,
3667
+ store_connection_name = store_connection_name ,
3596
3668
collection = collection ,
3597
- model = model ,
3669
+ embeddings_model = embeddings_model ,
3598
3670
max_chunk_length = max_chunk_length ,
3599
3671
max_overlap = max_overlap ,
3600
3672
data_type = parse_singular_param_to_enum (data_type ,
0 commit comments