Skip to content

Commit

Permalink
feat (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeichmann authored Aug 11, 2024
1 parent d121d59 commit 77dc78a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pages/docs/prompts/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ prompt = langfuse.get_prompt("movie-critic", label="latest")

# Extend cache TTL from default 60 to 300 seconds
prompt = langfuse.get_prompt("movie-critic", cache_ttl_seconds=300)

# Number of retries on fetching prompts from the server. Default is 2.
prompt = langfuse.get_prompt("movie-critic", max_retries=3)

# Timeout per call to the Langfuse API in seconds. Default is 20.
prompt = langfuse.get_prompt("movie-critic", fetch_timeout_seconds=3)
```

Attributes
Expand Down Expand Up @@ -241,6 +247,17 @@ const prompt = await langfuse.getPrompt("movie-critic", undefined, {
const prompt = await langfuse.getPrompt("movie-critic", undefined, {
cacheTtlSeconds: 300,
});

// Number of retries on fetching prompts from the server. Default is 2.
const promptWithMaxRetries = await langfuse.getPrompt("movie-critic", undefined, {
maxRetries: 5,
});

// Timeout per call to the Langfuse API in milliseconds. Default is 10 seconds.
const promptWithFetchTimeout = await langfuse.getPrompt("movie-critic", undefined, {
fetchTimeoutMs: 5000,
});

```

Attributes
Expand Down

0 comments on commit 77dc78a

Please sign in to comment.