Skip to content

Commit 9aede09

Browse files
committed
update dynamic variables
1 parent 0e80517 commit 9aede09

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fern/assistants/dynamic-variables.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ subtitle: >-
66
slug: assistants/dynamic-variables
77
---
88

9-
109
Prompts, messages, and other assistant properties can be dynamically set when starting a call based on templates.
1110
These templates are defined using double curly braces `{{variableName}}`.
1211
This is useful when you want to customize the assistant for a specific call.
@@ -67,3 +66,13 @@ meaning that you don't need to set them manually in `variableValues`:
6766
| `{{year}}` | Current year (UTC) | 2024 |
6867

6968
**Note:** You will need to add the `{{variableName}}` in this format in all your prompts, whether it is the first message or anywhere else you want to use it.
69+
70+
## Advanced Date and Time Usage
71+
72+
We use [LiquidJS](https://liquidjs.com/) for dynamic variables. You can use the `date` filter to format the date and time in the timezone you want.
73+
74+
```liquid
75+
{{"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"}}
76+
```
77+
78+
This should return the current date and time in New York.

0 commit comments

Comments
 (0)