Use your managed prompts with the Traceloop SDKs
traceloop_sync_enabled=True
when initializing the SDK or the TRACELOOP_SYNC_ENABLED
environment variable to true
,
to enable the prompt sync.
The SDK fetches your prompts from Traceloop servers. Changes made to a prompt are available in the SDK during runtime.
The SDK polls the Traceloop servers for changes every every poll interval.
The default poll interval is 60 seconds but can be configured with the TRACELOOP_SYNC_POLL_INTERVAL
environment variable, or the initialization function.
When in the Development
environment, the poll interval is determined by the TRACELOOP_SYNC_DEV_POLL_INTERVAL
environment variable or appropriate initialization argument, and defaults to 5 seconds.
Make sure you’ve configured the SDK with the right environment and API Key. See the SDK documentation for more information.
joke_generator
in the UI and set ot to:
get_prompt
:
prompt_args
is compatible with the API used by the
foundation models SDKs (OpenAI, Anthropic, etc.) which means you should
directly plug in the response to the appropriate API call.