Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] OV GenAI Python API for master #27028

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[DOCS] script fix
  • Loading branch information
tadamczx committed Oct 14, 2024
commit 2e7e1af589cf9b66383b00b791f556a7109ed684
16 changes: 9 additions & 7 deletions docs/scripts/install_appropriate_openvino_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument('--ov_dir', type=Path, help='OpenVINO docs directory')
parser.add_argument('--python', type=Path, help='Python executable')
parser.add_argument('--enable_genai', type=str, choices=['ON', 'OFF'], default='OFF', help='Enable GenAI API installation')
args = parser.parse_args()

version_name = determine_openvino_version(args.ov_dir.joinpath("conf.py"))
Expand All @@ -44,20 +45,21 @@ def main():
print("OpenVINO nightly version installed. OpenVINO GenAI nightly version is not available.")
elif version_name is None or version_name == "latest":
install_package(args.python, "openvino")
install_package(args.python, "openvino-genai")
if args.enable_genai == 'ON':
install_package(args.python, "openvino-genai")
else:
ov_version = get_latest_version("openvino", version_name)
ov_genai_version = get_latest_version("openvino-genai", version_name)

if ov_version:
install_package(args.python, f"openvino=={ov_version}")
else:
print(f"No matching OpenVINO version found for {version_name}")

if ov_genai_version:
install_package(args.python, f"openvino-genai=={ov_genai_version}")
else:
print(f"No matching OpenVINO GenAI version found for {version_name}")
if args.enable_genai == 'ON':
ov_genai_version = get_latest_version("openvino-genai", version_name)
if ov_genai_version:
install_package(args.python, f"openvino-genai=={ov_genai_version}")
else:
print(f"No matching OpenVINO GenAI version found for {version_name}")


if __name__ == "__main__":
Expand Down
Loading