fix: Fixed issue #1523 (#1526)

This commit is contained in:
Vinayak Sharma
2024-07-10 02:40:15 +05:30
committed by GitHub
parent f24904216c
commit f14c1b7e5e
4 changed files with 7 additions and 3 deletions

View File

@@ -97,6 +97,7 @@ def azure_openai_chat_completions_request(
printd(f"Sending request to {url}")
try:
data["messages"] = [i.to_openai_dict() for i in data["messages"]]
response = requests.post(url, headers=headers, json=data)
printd(f"response = {response}")
response.raise_for_status() # Raises HTTPError for 4XX/5XX status

View File

@@ -71,7 +71,7 @@ def setup_agents_index_router(server: SyncServer, interface: QueuingInterface, p
persona_name = request.config["persona_name"] if "persona_name" in request.config else None
persona = request.config["persona"] if "persona" in request.config else None
request.config["preset"] if ("preset" in request.config and request.config["preset"]) else settings.default_preset
tool_names = request.config["function_names"]
tool_names = request.config["function_names"] if ("function_names" in request.config and request.config["function_names"]) else None
metadata = request.config["metadata"] if "metadata" in request.config else {}
metadata["human"] = human_name
metadata["persona"] = persona_name

4
poetry.lock generated
View File

@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8. and should not be changed by hand.
[[package]]
name = "aiohttp"
@@ -6341,4 +6341,4 @@ server = ["fastapi", "uvicorn", "websockets"]
[metadata]
lock-version = "2.0"
python-versions = "<3.13,>=3.10"
content-hash = "904e243813980d61b67db2d1dc96cc782299bcdfb80bb122e4f2013f11f2a9c4"
content-hash = "0522ceb628efd51c0679f3fe8b6da161c5a25a50166f81e58f1be76d0120524c"

View File

@@ -76,6 +76,9 @@ autogen = ["pyautogen"]
qdrant = ["qdrant-client"]
ollama = ["llama-index-embeddings-ollama"]
[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
[tool.black]
line-length = 140
target-version = ['py310', 'py311']