mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
fix: Correct OpenAI CLI syntax for chat completions
- Fix openai CLI command to use correct syntax: chat.completions.create - Use -g flag instead of -p for message input - Bump version to 0.3.16 The correct command is now: openai api chat.completions.create -m gpt-4 -g 'message'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "hanzo"
|
||||
version = "0.3.15"
|
||||
version = "0.3.16"
|
||||
description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
|
||||
authors = [
|
||||
{name = "Hanzo AI", email = "[email protected]"},
|
||||
|
||||
@@ -26,7 +26,7 @@ from .utils.output import console
|
||||
from .interactive.repl import HanzoREPL
|
||||
|
||||
# Version
|
||||
__version__ = "0.3.15"
|
||||
__version__ = "0.3.16"
|
||||
|
||||
|
||||
@click.group(invoke_without_command=True)
|
||||
|
||||
@@ -1100,8 +1100,8 @@ Examples:
|
||||
console.print("Then use: hanzo dev --orchestrator codex")
|
||||
return
|
||||
|
||||
# Use openai CLI to chat
|
||||
cmd = ["openai", "api", "chat", "-m", "gpt-4", "-p", message]
|
||||
# Use openai CLI to chat - correct syntax
|
||||
cmd = ["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", message]
|
||||
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
@@ -2336,7 +2336,7 @@ class MultiClaudeOrchestrator(HanzoDevOrchestrator):
|
||||
try:
|
||||
import subprocess
|
||||
result = subprocess.run(
|
||||
["openai", "api", "chat", "-m", "gpt-4", "-p", prompt],
|
||||
["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", prompt],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=30
|
||||
|
||||
Reference in New Issue
Block a user