wandb.weave¶
Integration with Weave from Weights & Biases
get_class_functions(cls)
¶
Get the class functions of a BaseModel
.
Source code in mirascope/base/ops_utils.py
with_weave(cls)
¶
Wraps base classes to automatically use weave.
Supported base classes: BaseCall
, BaseExtractor
, BaseVectorStore
,
BaseChunker
, BaseEmbedder
Example:
import weave
from mirascope.openai import OpenAICall
from mirascope.wandb import with_weave
weave.init("my-project")
@with_weave
class BookRecommender(OpenAICall):
prompt_template = "Please recommend some {genre} books"
genre: str
recommender = BookRecommender(genre="fantasy")
response = recommender.call() # this will automatically get logged with weave
print(response.content)