Version control zod schema prompts for tool calling
Karthik Kalyanaraman
⸱
Cofounder and CTO
Nov 15, 2024
Introduction
We are excited to announce that Langtrace now supports storing and version controlling zod schema prompts. This means you can store zod schema prompts with in Langtrace and fetch it directly into your code, update versions, deploy a new version or roll back to an older version directly from Langtrace
Usage Instructions
Create a new project in Langtrace and go to the Prompts tab. Click on the “Create Prompt” button to create a new prompt.
Paste the Zod schema in the “Prompt” field. You can define the schema for the tool calling in the Zod format. This schema will be automatically converted to JSON schema which is accepted by the OpenAI spec for tool calling.
Once you have created a prompt, you can make it available by clicking the “Go Live” button. This will make the prompt available for use in your applications by default when you fetch it using the SDK. When fetched, the schema will be converted to JSON schema and can be directly used for tool calling.
Use the prompt in your application by fetching it using the SDK.
You can also fetch a specific version of the prompt by passing the version number in the options. And you can get the “Prompt Registry ID” from the Langtrace UI. That’s it! You have successfully created and versioned a zod schema in Langtrace. You can now use this schema in your applications and easily manage and reuse it across your projects.
For more information check out our docs here - https://docs.langtrace.ai/features/manage_zod_schema#manage-zod-schema-for-tool-calling
Useful Resources
Getting started with Langtrace https://docs.langtrace.ai/introduction
Langtrace Website https://langtrace.ai/
Langtrace Discord https://discord.langtrace.ai/
Langtrace Github https://github.com/Scale3-Labs/langtrace
Langtrace Twitter(X) https://x.com/langtrace_ai
Langtrace Linkedin https://www.linkedin.com/company/langtrace/about/
Ready to deploy?
Try out the Langtrace SDK with just 2 lines of code.
Want to learn more?
Check out our documentation to learn more about how langtrace works
Join the Community
Check out our Discord community to ask questions and meet customers