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>
This commit is contained in:
Родитель
bdeb2c2e29
Коммит
f319b33e26
|
@ -33,7 +33,7 @@ ORCHESTRATION_TRIGGER = "orchestrationTrigger"
|
|||
ACTIVITY_TRIGGER = "activityTrigger"
|
||||
ENTITY_TRIGGER = "entityTrigger"
|
||||
DURABLE_CLIENT = "durableClient"
|
||||
ASSISTANT_SKILLS_TRIGGER = "assistantSkillsTrigger"
|
||||
ASSISTANT_SKILL_TRIGGER = "assistantSkillTrigger"
|
||||
TEXT_COMPLETION = "textCompletion"
|
||||
ASSISTANT_QUERY = "assistantQuery"
|
||||
EMBEDDINGS = "embeddings"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
|
||||
from azure.functions.decorators.constants import (ASSISTANT_SKILLS_TRIGGER,
|
||||
from azure.functions.decorators.constants import (ASSISTANT_SKILL_TRIGGER,
|
||||
TEXT_COMPLETION,
|
||||
ASSISTANT_QUERY,
|
||||
EMBEDDINGS, EMBEDDINGS_STORE,
|
||||
|
@ -27,7 +27,7 @@ class AssistantSkillTrigger(Trigger):
|
|||
|
||||
@staticmethod
|
||||
def get_binding_name() -> str:
|
||||
return ASSISTANT_SKILLS_TRIGGER
|
||||
return ASSISTANT_SKILL_TRIGGER
|
||||
|
||||
def __init__(self,
|
||||
name: str,
|
||||
|
|
|
@ -10,7 +10,7 @@ from azure.functions.decorators.openai import AssistantSkillTrigger, \
|
|||
|
||||
class TestOpenAI(unittest.TestCase):
|
||||
|
||||
def test_assistant_skills_trigger_valid_creation(self):
|
||||
def test_assistant_skill_trigger_valid_creation(self):
|
||||
trigger = AssistantSkillTrigger(name="test",
|
||||
function_description="description",
|
||||
function_name="test_function_name",
|
||||
|
@ -19,7 +19,7 @@ class TestOpenAI(unittest.TestCase):
|
|||
data_type=DataType.UNDEFINED,
|
||||
dummy_field="dummy")
|
||||
self.assertEqual(trigger.get_binding_name(),
|
||||
"assistantSkillsTrigger")
|
||||
"assistantSkillTrigger")
|
||||
self.assertEqual(
|
||||
trigger.get_dict_repr(), {"name": "test",
|
||||
"functionDescription": "description",
|
||||
|
@ -27,7 +27,7 @@ class TestOpenAI(unittest.TestCase):
|
|||
"parameterDescriptionJson": "test_json",
|
||||
"model": OpenAIModels.DefaultChatModel,
|
||||
"dataType": DataType.UNDEFINED,
|
||||
'type': 'assistantSkillsTrigger',
|
||||
'type': 'assistantSkillTrigger',
|
||||
'dummyField': 'dummy',
|
||||
"direction": BindingDirection.IN,
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче