Skip to content

Commit f319b33

Browse files
hallvictoriaVictoria Hall
and
Victoria Hall
authored
Fix OpenAI decorators assistant skill trigger type typo (#224)
* changing default {} to None * renamed type to singular * clean up past commits * missed references * missed references --------- Co-authored-by: Victoria Hall <victoria.hall@microsoft.com>
1 parent bdeb2c2 commit f319b33

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

azure/functions/decorators/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
ACTIVITY_TRIGGER = "activityTrigger"
3434
ENTITY_TRIGGER = "entityTrigger"
3535
DURABLE_CLIENT = "durableClient"
36-
ASSISTANT_SKILLS_TRIGGER = "assistantSkillsTrigger"
36+
ASSISTANT_SKILL_TRIGGER = "assistantSkillTrigger"
3737
TEXT_COMPLETION = "textCompletion"
3838
ASSISTANT_QUERY = "assistantQuery"
3939
EMBEDDINGS = "embeddings"

azure/functions/decorators/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional
22

3-
from azure.functions.decorators.constants import (ASSISTANT_SKILLS_TRIGGER,
3+
from azure.functions.decorators.constants import (ASSISTANT_SKILL_TRIGGER,
44
TEXT_COMPLETION,
55
ASSISTANT_QUERY,
66
EMBEDDINGS, EMBEDDINGS_STORE,
@@ -27,7 +27,7 @@ class AssistantSkillTrigger(Trigger):
2727

2828
@staticmethod
2929
def get_binding_name() -> str:
30-
return ASSISTANT_SKILLS_TRIGGER
30+
return ASSISTANT_SKILL_TRIGGER
3131

3232
def __init__(self,
3333
name: str,

tests/decorators/test_openai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestOpenAI(unittest.TestCase):
1212

13-
def test_assistant_skills_trigger_valid_creation(self):
13+
def test_assistant_skill_trigger_valid_creation(self):
1414
trigger = AssistantSkillTrigger(name="test",
1515
function_description="description",
1616
function_name="test_function_name",
@@ -19,15 +19,15 @@ def test_assistant_skills_trigger_valid_creation(self):
1919
data_type=DataType.UNDEFINED,
2020
dummy_field="dummy")
2121
self.assertEqual(trigger.get_binding_name(),
22-
"assistantSkillsTrigger")
22+
"assistantSkillTrigger")
2323
self.assertEqual(
2424
trigger.get_dict_repr(), {"name": "test",
2525
"functionDescription": "description",
2626
"functionName": "test_function_name",
2727
"parameterDescriptionJson": "test_json",
2828
"model": OpenAIModels.DefaultChatModel,
2929
"dataType": DataType.UNDEFINED,
30-
'type': 'assistantSkillsTrigger',
30+
'type': 'assistantSkillTrigger',
3131
'dummyField': 'dummy',
3232
"direction": BindingDirection.IN,
3333
})

0 commit comments

Comments
 (0)