Skip to content

Commit

Permalink
[DOCS] OV GenAI API 2024.3 docs additions (#25596)
Browse files Browse the repository at this point in the history
Generation of GenAI API docs.
  • Loading branch information
tadamczx authored Jul 18, 2024
1 parent 054c335 commit 1e02ac1
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
10 changes: 10 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set(ENABLE_NOTEBOOKS OFF CACHE BOOL "Build with openvino notebooks.")
set(ENABLE_OMZ OFF CACHE BOOL "Build with open_model_zoo.")
set(ENABLE_OVMS OFF CACHE BOOL "Build with ovms.")
set(OVMS_DOCS_DIR "" CACHE PATH "Path to model server documentation dir.")
set(ENABLE_GENAI_API OFF CACHE BOOL "Build with OpenVINO GenAI API")
set(OV_GENAI_SOURCE "" CACHE PATH "Path to OpenVINO GenAI cloned repository")

if(${ENABLE_OVMS} AND (OVMS_DOCS_DIR STREQUAL ""))
message( FATAL_ERROR "You want to build OVMS, but OVMS_DOCS_DIR variable is empty." )
Expand Down Expand Up @@ -99,6 +101,14 @@ function(build_docs)
--exclude_dir=${SPHINX_SOURCE_DIR})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OMZ")
endif()

if(${ENABLE_GENAI_API})
list(PREPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OpenVINO GenAI Python API")
list(PREPEND commands
COMMAND ${Python3_EXECUTABLE} -m pip install openvino-genai
)
list(PREPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OpenVINO GenAI Python API")
endif()

# Preprocess docs
add_custom_target(preprocess_docs
Expand Down
9 changes: 5 additions & 4 deletions docs/sphinx_setup/api/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ API Reference
:maxdepth: 2
:hidden:

ie_python_api/api
OpenVINO Runtime C++ API <c_cpp_api/group__ov__cpp__api>
OpenVINO Runtime C API <c_cpp_api/group__ov__c__api>
OpenVINO Node.js API <nodejs_api/nodejs_api>
Core Python API <ie_python_api/api>
Core C++ API <c_cpp_api/group__ov__cpp__api>
Core C API <c_cpp_api/group__ov__c__api>
Core Node.js API <nodejs_api/nodejs_api>
GenAI Python API <genai_api/api>



Expand Down
54 changes: 54 additions & 0 deletions docs/sphinx_setup/api/genai_api/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
OpenVINO GenAI API
===================

.. meta::
:description: Explore OpenVINO GenAI Python API and implementation of its features in Intel® Distribution of OpenVINO™ GenAI.


.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.DecodedResults

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.EncodedResults

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.GenerationConfig

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.LLMPipeline

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.StopCriteria

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.StreamerBase

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.TokenizedInputs

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst

openvino_genai.Tokenizer
3 changes: 2 additions & 1 deletion docs/sphinx_setup/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
try:
import openvino
except ImportError:
autodoc_mock_imports = ["openvino"]
autodoc_mock_imports = ["openvino", "openvino_genai"]


breathe_projects = {
"openvino": "../xml/"
Expand Down

0 comments on commit 1e02ac1

Please sign in to comment.