Do you want to experiment with Groq models on Weave without any setup? Try the LLM Playground.
Model objects.
Tracing
It’s important to store traces of language model applications in a central location, both during development and in production. These traces can help you debug your application and serve as a dataset to improve it. Weave automatically captures traces for Groq. To start tracking, callweave.init(project_name="<your-wandb-project-name>") and use the library as normal. Replace values enclosed in <> with your own.
![]() |
|---|
| Weave now tracks and logs all LLM calls made through the Groq library. You can view the traces in the Weave web interface. |
Track your own ops
Wrap a function with@weave.op to capture inputs, outputs, and app logic so you can debug how data flows through your app. You can deeply nest ops and build a tree of functions that you want to track. This also automatically versions code as you experiment to capture ad-hoc details that haven’t been committed to git.
Create a function decorated with @weave.op.
In the following example, the recommend_places_to_visit function is wrapped with @weave.op and recommends places to visit in a city.
![]() |
|---|
Decorate the recommend_places_to_visit function with @weave.op to trace its inputs, outputs, and all internal LM calls made inside the function. |
Create a Model for easier experimentation
Organizing experimentation is difficult when there are many moving pieces. By using the Model class, you can capture and organize the experimental details of your app like your system prompt or the model you’re using. This helps organize and compare different iterations of your app.
In addition to versioning code and capturing inputs and outputs, Models capture structured parameters that control your application’s behavior, helping you find what parameters worked best. You can also use Weave Models with serve, and Evaluations.
In the following example, you can experiment with GroqCityVisitRecommender. Every time you change one of these, you get a new version of GroqCityVisitRecommender.
![]() |
|---|
Trace and version your calls using a Model. |
Serve a Weave Model
After you have a versionedModel, you can deploy it as a service for testing or downstream applications. Given a Weave reference to any weave.Model object, you can spin up a FastAPI server and serve it.
Serve your model with the following command in the terminal:



