Skip to content

Commit

Permalink
Fix reference doc for integrations (#388)
Browse files Browse the repository at this point in the history
* Make sure that langchain integration docstrings are updated
* Fix Llamda-index integration doc not beeing generated
  • Loading branch information
Lothiraldan authored Oct 14, 2024
1 parent 06bc519 commit f788dc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions apps/opik-documentation/python-sdk-docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ sphinx-autobuild
sphinx
furo
sphinx-click

# Dependency to document LlamaIndex integration
llama_index
16 changes: 7 additions & 9 deletions sdks/python/src/opik/integrations/langchain/opik_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ def _get_span_type(run: "Run") -> Literal["llm", "tool", "general"]:


class OpikTracer(BaseTracer):
"""Opik Tracer."""
"""Langchain Opik Tracer.
Args:
tags: List of tags to be applied to each trace logged by the tracer.
metadata: Additional metadata for each trace logged by the tracer.
project_name: The name of the project to log data.
"""

def __init__(
self,
Expand All @@ -35,14 +41,6 @@ def __init__(
project_name: Optional[str] = None,
**kwargs: Any,
) -> None:
"""
Initialize the Opik Tracer.
Args:
tags: List of tags to be applied to each trace logged by the tracer.
metadata: Additional metadata for each trace logged by the tracer.
project_name: The name of the project to log data.
"""
super().__init__(**kwargs)
self._trace_default_metadata = metadata if metadata is not None else {}
self._trace_default_tags = tags
Expand Down

0 comments on commit f788dc4

Please sign in to comment.