Add explicit baseURL examples to ai docs
Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
@@ -659,6 +659,16 @@ the resulting value must not be empty. The value must also be a valid absolute U
|
||||
the `http` or `https` protocol, without query parameters, hash fragments, or embedded
|
||||
username/password credentials.
|
||||
|
||||
Examples:
|
||||
|
||||
- ✅ `https://api.trigger.dev`
|
||||
- ✅ `https://api.trigger.dev/custom-prefix`
|
||||
- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
|
||||
- ❌ `https://api.trigger.dev?foo=bar`
|
||||
- ❌ `https://api.trigger.dev#fragment`
|
||||
- ❌ `https://user:pass@api.trigger.dev`
|
||||
- ❌ `ftp://api.trigger.dev`
|
||||
|
||||
For richer TypeScript ergonomics in app code, `@trigger.dev/ai` also exports:
|
||||
|
||||
- `TriggerChatHeadersInput`
|
||||
|
||||
@@ -166,6 +166,16 @@ both cleanup steps (`set` inactive state and `delete`) even if one of them fails
|
||||
- `baseURL` must not include query parameters or hash fragments.
|
||||
- `baseURL` must not include username/password URL credentials.
|
||||
|
||||
Examples:
|
||||
|
||||
- ✅ `https://api.trigger.dev`
|
||||
- ✅ `https://api.trigger.dev/custom-prefix`
|
||||
- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
|
||||
- ❌ `https://api.trigger.dev?foo=bar` (query string)
|
||||
- ❌ `https://api.trigger.dev#fragment` (hash fragment)
|
||||
- ❌ `https://user:pass@api.trigger.dev` (credentials)
|
||||
- ❌ `ftp://api.trigger.dev` (non-http protocol)
|
||||
|
||||
## `ai.tool(...)` example
|
||||
|
||||
```ts
|
||||
|
||||
Reference in New Issue
Block a user