Skip to content

Conversation

@kiranandcode
Copy link
Contributor

This PR proposes an alternative implementation for #493 . Instead of requiring the user to explicitly annotate functions with @weave.op this PR updates the implementation of Template.call to automatically insert @weave.op calls.

@Template.define
def haiku(topic: str) -> str:
  """Generate a haiku about {topic}."""
   raise NotHandled

Copy link
Contributor

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weave is a nice library, but it's not obvious why we should bake it into the library as the sole observability solution (especially because it appears to lock you into the wandb platform), or even that it requires library-level support at all. It seems like you could do the same thing with a handler for Template.__apply__ in application code.

@kiranandcode
Copy link
Contributor Author

Yep, that makes sense. I think I'll update #508 to describe implementing a handler (which also handles the issue I commented regarding tools being hidden).

@kiranandcode kiranandcode deleted the kg-observability-integration branch January 26, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants