@@ -236,6 +236,12 @@ def call_llm(messages):
236236 }
237237 ```
238238
239+ The decorated function should return a string or the output should be JSON serializable. If
240+ the output cannot be serialized, TypeError will be raised.
241+
242+ If the function raises an exception, the log created by the function will have the output
243+ field set to None and the error field set to the string representation of the exception.
244+
239245 :param path: The path where the Prompt is created. If not
240246 provided, the function name is used as the path and the File
241247 is created in the root of your Humanloop organization workspace.
@@ -308,6 +314,13 @@ def calculator(a: int, b: Optional[int]) -> int:
308314 },
309315 "output": 3
310316 }
317+ ```
318+
319+ The decorated function should return a string or the output should be JSON serializable. If
320+ the output cannot be serialized, TypeError will be raised.
321+
322+ If the function raises an exception, the log created by the function will have the output
323+ field set to None and the error field set to the string representation of the exception.
311324
312325 :param path: The path to the Tool. If not provided, the function name
313326 will be used as the path and the File will be created in the root
@@ -365,6 +378,12 @@ def entrypoint():
365378 will be nested, allowing you to track the whole conversation session
366379 between the user and the assistant.
367380
381+ The decorated function should return a string or the output should be JSON serializable. If
382+ the output cannot be serialized, TypeError will be raised.
383+
384+ If the function raises an exception, the log created by the function will have the output
385+ field set to None and the error field set to the string representation of the exception.
386+
368387 :param path: The path to the Flow. If not provided, the function name
369388 will be used as the path and the File will be created in the root
370389 of your organization workspace.
0 commit comments