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:
parent
81bb749ea8
commit
9bdd353666
5 changed files with 10 additions and 10 deletions
|
|
@ -15,7 +15,7 @@ Please do not try to push directly to this repo unless you are a maintainer.
|
||||||
|
|
||||||
You can develop Langflow using docker compose, or locally.
|
You can develop Langflow using docker compose, or locally.
|
||||||
|
|
||||||
We provide a .vscode/launch.json file for debugging the backend in VSCode, which is a lot faster than using docker compose.
|
We provide a `.vscode/launch.json` file for debugging the backend in VSCode, which is a lot faster than using docker compose.
|
||||||
|
|
||||||
Setting up hooks:
|
Setting up hooks:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ The RAG flow is a bit more complex. It consists of:
|
||||||
style={{ width: "80%", margin: "20px auto" }}
|
style={{ width: "80%", margin: "20px auto" }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
To run it all we have to do is click on the 🤖 _Playground_ button and start interacting with your RAG application.
|
To run it all we have to do is click on the **Playground** button and start interacting with your RAG application.
|
||||||
|
|
||||||
<ZoomableImage
|
<ZoomableImage
|
||||||
alt="Docusaurus themed image"
|
alt="Docusaurus themed image"
|
||||||
|
|
@ -157,7 +157,7 @@ To run it all we have to do is click on the 🤖 _Playground_ button and start i
|
||||||
style={{ width: "80%", margin: "20px auto" }}
|
style={{ width: "80%", margin: "20px auto" }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
This opens the Playground where you can chat your data.
|
This opens the Playground where you can chat with your data.
|
||||||
|
|
||||||
Because this flow has a **Chat Input** and a **Text Output** component, the Panel displays a chat input at the bottom and the Extracted Chunks section on the left.
|
Because this flow has a **Chat Input** and a **Text Output** component, the Panel displays a chat input at the bottom and the Extracted Chunks section on the left.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ async def build_vertex(
|
||||||
result_data_response = ResultDataResponse(**result_dict.model_dump())
|
result_data_response = ResultDataResponse(**result_dict.model_dump())
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(f"Error building vertex: {exc}")
|
logger.exception(f"Error building Component: {exc}")
|
||||||
params = format_exception_message(exc)
|
params = format_exception_message(exc)
|
||||||
valid = False
|
valid = False
|
||||||
log_obj = Log(message=params, type="error")
|
log_obj = Log(message=params, type="error")
|
||||||
|
|
@ -238,7 +238,7 @@ async def build_vertex(
|
||||||
)
|
)
|
||||||
return build_response
|
return build_response
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.error(f"Error building vertex: {exc}")
|
logger.error(f"Error building Component: {exc}")
|
||||||
logger.exception(exc)
|
logger.exception(exc)
|
||||||
message = parse_exception(exc)
|
message = parse_exception(exc)
|
||||||
raise HTTPException(status_code=500, detail=message) from 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}")
|
raise ValueError(f"No result found for vertex {vertex_id}")
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(f"Error building vertex: {exc}")
|
logger.exception(f"Error building Component: {exc}")
|
||||||
exc_message = parse_exception(exc)
|
exc_message = parse_exception(exc)
|
||||||
if exc_message == "The message must be an iterator or an async iterator.":
|
if exc_message == "The message must be an iterator or an async iterator.":
|
||||||
exc_message = "This stream has already been closed."
|
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")
|
return StreamingResponse(stream_vertex(), media_type="text/event-stream")
|
||||||
except Exception as exc:
|
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
|
||||||
|
|
|
||||||
|
|
@ -774,7 +774,7 @@ class Graph:
|
||||||
log_transaction(flow_id, vertex, status="success")
|
log_transaction(flow_id, vertex, status="success")
|
||||||
return next_runnable_vertices, top_level_vertices, result_dict, params, valid, artifacts, vertex
|
return next_runnable_vertices, top_level_vertices, result_dict, params, valid, artifacts, vertex
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(f"Error building vertex: {exc}")
|
logger.exception(f"Error building Component: {exc}")
|
||||||
flow_id = self.flow_id
|
flow_id = self.flow_id
|
||||||
log_transaction(flow_id, vertex, status="failure", error=str(exc))
|
log_transaction(flow_id, vertex, status="failure", error=str(exc))
|
||||||
raise exc
|
raise exc
|
||||||
|
|
|
||||||
|
|
@ -577,7 +577,7 @@ class Vertex:
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Params {key} ({self.params[key]}) is not a list and cannot be extended with {result}"
|
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
|
) from e
|
||||||
|
|
||||||
def _handle_func(self, key, result):
|
def _handle_func(self, key, result):
|
||||||
|
|
@ -618,7 +618,7 @@ class Vertex:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(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):
|
def _update_built_object_and_artifacts(self, result):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue