Duration
11s
Input Tokens
89765
Output Tokens
441
Cost
$0.28
Context
Input
In the blogpost 'Agentic customer service chatbot with tools, tracing and evals' a python function is created to identify the user intent. What is the name of this function? def name_of_function(messages)Expected output
determine_intentModel output
The function created to identify the user intent in the blogpost 'Agentic customer service chatbot with tools, tracing and evals' is called **`determine_intent`**.
Here is the function signature as shown in the blog:
```python
def determine_intent(messages):
intent, _ = opper.call(
name="determine_intent",
instructions="Analyze the user message and determine their intent. Supported intents are get_order_status and query products.",
input={"messages": messages},
output_type=IntentClassification
)
return intent
```
This function takes a `messages` parameter (the conversation history) and uses `opper.call` to classify the user's intent into one of three categories: `get_order_status`, `query_products`, or `unsupported`.