Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe7da77ed6 | ||
|
|
407458149b |
No files matched your search
@@ -39,6 +39,9 @@ class OpenaiProvider:
|
||||
# Add error handling if the client fails to initialize
|
||||
raise RuntimeError(f"Failed to initialize OpenAI client: {e}")
|
||||
|
||||
# Remove debug from kwargs if present
|
||||
kwargs.pop("debug", None)
|
||||
|
||||
# 2. Use the modern API syntax: client.chat.completions.create
|
||||
response = client.chat.completions.create(
|
||||
model=model or self.DEFAULT_MODEL,
|
||||
|
||||
@@ -19,6 +19,9 @@ class OpenrouterProvider:
|
||||
api_key=api_key,
|
||||
)
|
||||
|
||||
# Remove debug from kwargs if present
|
||||
kwargs.pop("debug", None)
|
||||
|
||||
response = client.chat.completions.create(
|
||||
model=model,
|
||||
messages=[{"role": "user", "content": prompt}],
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "devgen-cli"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
description = "A collection of developer tools"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in new issue
Block a user