Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
common/utility/autogen_model_factory.py
CHANGED
|
@@ -53,7 +53,7 @@ class AutoGenModelFactory:
|
|
| 53 |
elif provider.lower() == "google" or provider.lower() == "gemini":
|
| 54 |
if model_info is None:
|
| 55 |
model_info = {
|
| 56 |
-
"family": "
|
| 57 |
"vision": False,
|
| 58 |
"function_calling": True,
|
| 59 |
"json_output": True,
|
|
@@ -67,6 +67,7 @@ class AutoGenModelFactory:
|
|
| 67 |
model_info=model_info,
|
| 68 |
temperature=temperature,
|
| 69 |
max_tokens=2048,
|
|
|
|
| 70 |
extra_headers={"x-goog-api-key": os.environ["GOOGLE_API_KEY"]}
|
| 71 |
)
|
| 72 |
|
|
@@ -89,6 +90,7 @@ class AutoGenModelFactory:
|
|
| 89 |
api_key=os.environ["GROQ_API_KEY"],
|
| 90 |
model_info=model_info,
|
| 91 |
temperature=temperature,
|
|
|
|
| 92 |
max_tokens=2048
|
| 93 |
)
|
| 94 |
|
|
|
|
| 53 |
elif provider.lower() == "google" or provider.lower() == "gemini":
|
| 54 |
if model_info is None:
|
| 55 |
model_info = {
|
| 56 |
+
"family": "gemini",
|
| 57 |
"vision": False,
|
| 58 |
"function_calling": True,
|
| 59 |
"json_output": True,
|
|
|
|
| 67 |
model_info=model_info,
|
| 68 |
temperature=temperature,
|
| 69 |
max_tokens=2048,
|
| 70 |
+
structured_output=False, # Disable for Gemini compatibility
|
| 71 |
extra_headers={"x-goog-api-key": os.environ["GOOGLE_API_KEY"]}
|
| 72 |
)
|
| 73 |
|
|
|
|
| 90 |
api_key=os.environ["GROQ_API_KEY"],
|
| 91 |
model_info=model_info,
|
| 92 |
temperature=temperature,
|
| 93 |
+
structured_output=False, # Disable for Groq compatibility
|
| 94 |
max_tokens=2048
|
| 95 |
)
|
| 96 |
|