@@ -8,36 +8,35 @@ class UserFeedback(BaseAnnotation):
88 def __init__ (self , http : HTTPClient , app_name : str ):
99 super ().__init__ (http , app_name , "user_feedback" )
1010
11-
12- def create (
13- self ,
14- annotation_task : str ,
15- entity_instance_id : str ,
16- tags : Dict [str , Any ],
17- ) -> None :
18- """Create an annotation for a specific task.
19-
20- Args:
21- annotation_task (str): The ID/slug of the annotation task to report to.
22- Can be found at app.traceloop.com/annotation_tasks/:annotation_task_id
23- entity_instance_id (str): The ID of the specific entity instance being annotated, should be reported
24- in the association properties
25- tags (Dict[str, Any]): Dictionary containing the tags to be reported.
26- Should match the tags defined in the annotation task
27-
28- Example:
29- ```python
30- client = Client(api_key="your-key")
31- client.annotation.create(
32- annotation_task="task_123",
33- entity_instance_id="instance_456",
34- tags={
35- "sentiment": "positive",
36- "relevance": 0.95,
37- "tones": ["happy", "nice"]
38- },
39- )
40- ```
41- """
42-
43- return BaseAnnotation .create (self , annotation_task , entity_instance_id , tags )
11+ def create (
12+ self ,
13+ annotation_task : str ,
14+ entity_id : str ,
15+ tags : Dict [str , Any ],
16+ ) -> None :
17+ """Create an annotation for a specific task.
18+
19+ Args:
20+ annotation_task (str): The ID/slug of the annotation task to report to.
21+ Can be found at app.traceloop.com/annotation_tasks/:annotation_task_id
22+ entity_id (str): The ID of the specific entity being annotated, should be reported
23+ in the association properties
24+ tags (Dict[str, Any]): Dictionary containing the tags to be reported.
25+ Should match the tags defined in the annotation task
26+
27+ Example:
28+ ```python
29+ client = Client(api_key="your-key")
30+ client.annotation.create(
31+ annotation_task="task_123",
32+ entity_id="instance_456",
33+ tags={
34+ "sentiment": "positive",
35+ "relevance": 0.95,
36+ "tones": ["happy", "nice"]
37+ },
38+ )
39+ ```
40+ """
41+
42+ return BaseAnnotation .create (self , annotation_task , entity_id , tags )
0 commit comments