Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openlayer-ai/openlayer-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: openlayer-ai/openlayer-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: vini/adds-oracle-oci-tracer
Choose a head ref
  • 12 commits
  • 5 files changed
  • 1 contributor

Commits on Aug 5, 2025

  1. feat(tracing): add OCI Generative AI LLM tracing integration

    - Introduced a new module `oci_tracer.py` that provides methods to trace Oracle OCI Generative AI LLMs.
    - Implemented tracing for both streaming and non-streaming chat completions, capturing metrics such as latency, token usage, and model parameters.
    - Added detailed logging for error handling and tracing steps to enhance observability.
    - Included comprehensive type annotations and Google-style docstrings for all functions to ensure clarity and maintainability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    1e79185 View commit details
    Browse the repository at this point in the history
  2. feat(tracing): add OCI Generative AI tracing examples and documentation

    - Introduced a comprehensive Jupyter notebook `oci_genai_tracing.ipynb` demonstrating the integration of Oracle OCI Generative AI with Openlayer tracing, covering non-streaming and streaming chat completions, advanced parameter configurations, and error handling.
    - Added a simple Python script `simple_oci_example.py` for quick testing of the OCI Generative AI tracer with Openlayer integration.
    - Created a README file to provide an overview, prerequisites, usage instructions, and supported models for the OCI tracing examples.
    - Enhanced the `__init__.py` file to include the new `trace_oci_genai` function for easier access to the OCI tracing functionality.
    - Ensured all new files adhere to coding standards with comprehensive type annotations and Google-style docstrings for clarity and maintainability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    e193b76 View commit details
    Browse the repository at this point in the history
  3. feat(tracing): enhance OCI Generative AI tracing notebook and integra…

    …tion
    
    - Updated the `oci_genai_tracing.ipynb` notebook to include new prerequisites for Openlayer setup, emphasizing the need for an Openlayer account and API key.
    - Improved the configuration section with detailed instructions for setting up Openlayer environment variables.
    - Refined the tracing logic in the `oci_tracer.py` module to handle streaming and non-streaming chat completions more effectively, including enhanced error handling and metadata extraction.
    - Added comprehensive logging for better observability of token usage and response metadata.
    - Ensured all changes adhere to coding standards with thorough type annotations and Google-style docstrings for maintainability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    7eade55 View commit details
    Browse the repository at this point in the history
  4. feat(tracing): enhance OCI tracing with timing and token estimation

    - Added timing measurements around the OCI client chat method to capture latency for both streaming and non-streaming chat completions.
    - Introduced a new function `estimate_prompt_tokens_from_chat_details` to estimate prompt tokens when usage information is not provided by OCI.
    - Updated `handle_streaming_chat`, `handle_non_streaming_chat`, and `stream_chunks` functions to utilize the new timing parameters for improved performance tracking.
    - Ensured all changes are compliant with coding standards, including comprehensive type annotations and Google-style docstrings for maintainability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    4794e15 View commit details
    Browse the repository at this point in the history
  5. refactor(tracing): improve code formatting and consistency in oci_tra…

    …cer.py
    
    - Enhanced code readability by standardizing spacing and formatting throughout the `oci_tracer.py` module.
    - Ensured consistent use of double quotes for string literals and improved alignment of code blocks.
    - Updated comments and docstrings for clarity and adherence to Google-style guidelines.
    - Maintained comprehensive type annotations and logging practices to support maintainability and observability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    a744e62 View commit details
    Browse the repository at this point in the history
  6. refactor(tracing): optimize chunk streaming and content extraction in…

    … oci_tracer.py
    
    - Simplified the streaming statistics tracking by reducing the number of metrics and focusing on essential timing information.
    - Enhanced performance by introducing a new `_extract_chunk_content` function for fast content extraction from OCI chunks, minimizing overhead during processing.
    - Removed redundant code related to raw output handling and chunk sampling, streamlining the overall logic for better readability and maintainability.
    - Updated comments and docstrings to reflect the changes and ensure compliance with Google-style guidelines.
    - Maintained comprehensive type annotations and logging practices to support ongoing maintainability and observability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    4df156a View commit details
    Browse the repository at this point in the history
  7. test(integration): enhance integration tests for conditional imports

    - Added support for the new `oci_tracer` in the `INTEGRATION_DEPENDENCIES` dictionary to ensure comprehensive testing of all integration modules.
    - Improved code formatting for better readability, including consistent use of double quotes and alignment of code blocks.
    - Streamlined the `run_integration_test` function by consolidating command construction for executing test scripts.
    - Updated print statements for clarity in test output, ensuring a more informative summary of test results.
    - Ensured compliance with Google-style docstrings and maintained comprehensive type annotations throughout the test suite.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    4e29de5 View commit details
    Browse the repository at this point in the history
  8. feat(tracing): update OCI Generative AI tracing notebook and remove e…

    …xamples
    
    - Refactored the `oci_genai_tracing.ipynb` notebook to enhance clarity and organization, including a new setup section for Openlayer API key and inference pipeline ID.
    - Removed the `README.md` and `simple_oci_example.py` files as they are no longer needed, consolidating documentation within the notebook.
    - Improved the structure of the notebook by replacing raw cells with markdown cells for better readability and user experience.
    - Ensured all changes comply with coding standards, including comprehensive type annotations and Google-style docstrings for maintainability.
    viniciusdsmello committed Aug 5, 2025
    Configuration menu
    Copy the full SHA
    acb6412 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2025

  1. feat(tracing): enhance OCI tracing functionality with token estimatio…

    …n options
    
    - Updated the `trace_oci_genai` function to include an optional `estimate_tokens` parameter, allowing users to control token estimation behavior when not provided by OCI responses.
    - Enhanced the `oci_genai_tracing.ipynb` notebook to document the new parameter and its implications for token estimation, improving user understanding and experience.
    - Modified the `extract_tokens_info` function to handle token estimation more robustly, returning None for token fields when estimation is disabled.
    - Ensured all changes comply with coding standards, including comprehensive type annotations and Google-style docstrings for maintainability.
    viniciusdsmello committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    cd08b3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a8d0e3 View commit details
    Browse the repository at this point in the history
  3. refactor(tracing): streamline input extraction in OCI tracer

    - Updated the `extract_inputs_from_chat_details` function to convert message roles to lowercase for consistency with OpenAI format.
    - Removed commented-out code related to system message extraction to enhance code clarity and maintainability.
    viniciusdsmello committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    9563e88 View commit details
    Browse the repository at this point in the history
  4. feat(tracing): add OCI GenAI tracing function

    - Updated the `__init__.py` file to include the new tracing function in the module's exports, improving accessibility for users.
    viniciusdsmello committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    e4a0620 View commit details
    Browse the repository at this point in the history
Loading