Minor documentation update and exception message fix to avoid confusion with Google Vertex (#2088)

* Update to use non-deprecated output parser imports

* Update documentation

* Revert "Update to use non-deprecated output parser imports"

This reverts commit 11a969d82b6b2b3659eb7c3c26b5b29a98815834.

* Update rag-with-astradb.mdx

* Update chat.py to clarify error message

vertex in the exception message appears to be confusing with google vertex and causes confusion when used with other providers.

* Minor formatting to highlight the vscode launch file
update the error message

* Fix a couple more error texts
This commit is contained in:
Madhavan 2024-06-15 10:06:07 -04:00 committed by GitHub
commit 9bdd353666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View file

@ -184,7 +184,7 @@ async def build_vertex(
result_data_response = ResultDataResponse(**result_dict.model_dump())
except Exception as exc:
logger.exception(f"Error building vertex: {exc}")
logger.exception(f"Error building Component: {exc}")
params = format_exception_message(exc)
valid = False
log_obj = Log(message=params, type="error")
@ -238,7 +238,7 @@ async def build_vertex(
)
return build_response
except Exception as exc:
logger.error(f"Error building vertex: {exc}")
logger.error(f"Error building Component: {exc}")
logger.exception(exc)
message = parse_exception(exc)
raise HTTPException(status_code=500, detail=message) from exc
@ -333,7 +333,7 @@ async def build_vertex_stream(
raise ValueError(f"No result found for vertex {vertex_id}")
except Exception as exc:
logger.exception(f"Error building vertex: {exc}")
logger.exception(f"Error building Component: {exc}")
exc_message = parse_exception(exc)
if exc_message == "The message must be an iterator or an async iterator.":
exc_message = "This stream has already been closed."
@ -344,4 +344,4 @@ async def build_vertex_stream(
return StreamingResponse(stream_vertex(), media_type="text/event-stream")
except Exception as exc:
raise HTTPException(status_code=500, detail="Error building vertex") from exc
raise HTTPException(status_code=500, detail="Error building Component") from exc

View file

@ -774,7 +774,7 @@ class Graph:
log_transaction(flow_id, vertex, status="success")
return next_runnable_vertices, top_level_vertices, result_dict, params, valid, artifacts, vertex
except Exception as exc:
logger.exception(f"Error building vertex: {exc}")
logger.exception(f"Error building Component: {exc}")
flow_id = self.flow_id
log_transaction(flow_id, vertex, status="failure", error=str(exc))
raise exc

View file

@ -577,7 +577,7 @@ class Vertex:
logger.exception(e)
raise ValueError(
f"Params {key} ({self.params[key]}) is not a list and cannot be extended with {result}"
f"Error building vertex {self.display_name}: {str(e)}"
f"Error building Component {self.display_name}: {str(e)}"
) from e
def _handle_func(self, key, result):
@ -618,7 +618,7 @@ class Vertex:
except Exception as exc:
logger.exception(exc)
raise ValueError(f"Error building vertex {self.display_name}: {str(exc)}") from exc
raise ValueError(f"Error building Component {self.display_name}: {str(exc)}") from exc
def _update_built_object_and_artifacts(self, result):
"""