Skip to content

Commit 9b22736

Browse files
authored
Add documentation for pipeline exceptions (#90)
1 parent a688a2a commit 9b22736

File tree

3 files changed

+46
-16
lines changed

3 files changed

+46
-16
lines changed

docs/source/api.rst

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Retrievers
1010
**********
1111

1212
RetrieverInterface
13-
===================
13+
==================
1414

1515
.. autoclass:: neo4j_genai.retrievers.base.Retriever
1616
:members:
@@ -70,9 +70,9 @@ PineconeNeo4jRetriever
7070
:members: search
7171

7272

73-
**********
73+
********
7474
Embedder
75-
**********
75+
********
7676

7777
.. autoclass:: neo4j_genai.embedder.Embedder
7878
:members:
@@ -88,21 +88,21 @@ Generation
8888
**********
8989

9090
LLMInterface
91-
======================
91+
============
9292

9393
.. autoclass:: neo4j_genai.llm.LLMInterface
9494
:members:
9595

9696

9797
OpenAILLM
98-
======================
98+
=========
9999

100100
.. autoclass:: neo4j_genai.llm.OpenAILLM
101101
:members:
102102

103103

104104
PromptTemplate
105-
======================
105+
==============
106106

107107
.. autoclass:: neo4j_genai.generation.prompts.PromptTemplate
108108
:members:
@@ -159,6 +159,12 @@ Errors
159159

160160
* :class:`neo4j_genai.exceptions.LLMGenerationError`
161161

162+
* :class:`neo4j_genai.pipeline.exceptions.PipelineDefinitionError`
163+
164+
* :class:`neo4j_genai.pipeline.exceptions.PipelineMissingDependencyError`
165+
166+
* :class:`neo4j_genai.pipeline.exceptions.PipelineStatusUpdateError`
167+
162168

163169
Neo4jGenAiError
164170
===============
@@ -224,7 +230,7 @@ Neo4jVersionError
224230

225231

226232
Text2CypherRetrievalError
227-
==========================
233+
=========================
228234

229235
.. autoclass:: neo4j_genai.exceptions.Text2CypherRetrievalError
230236
:show-inheritance:
@@ -238,21 +244,42 @@ SchemaFetchError
238244

239245

240246
RagInitializationError
241-
==========================
247+
======================
242248

243249
.. autoclass:: neo4j_genai.exceptions.RagInitializationError
244250
:show-inheritance:
245251

246252

247253
PromptMissingInputError
248-
==========================
254+
=======================
249255

250256
.. autoclass:: neo4j_genai.exceptions.PromptMissingInputError
251257
:show-inheritance:
252258

253259

254260
LLMGenerationError
255-
==========================
261+
==================
256262

257263
.. autoclass:: neo4j_genai.exceptions.LLMGenerationError
258264
:show-inheritance:
265+
266+
267+
PipelineDefinitionError
268+
=======================
269+
270+
.. autoclass:: neo4j_genai.pipeline.exceptions.PipelineDefinitionError
271+
:show-inheritance:
272+
273+
274+
PipelineMissingDependencyError
275+
==============================
276+
277+
.. autoclass:: neo4j_genai.pipeline.exceptions.PipelineMissingDependencyError
278+
:show-inheritance:
279+
280+
281+
PipelineStatusUpdateError
282+
=========================
283+
284+
.. autoclass:: neo4j_genai.pipeline.exceptions.PipelineStatusUpdateError
285+
:show-inheritance:

docs/source/user_guide_pipeline.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ User Guide: Pipeline
55

66
This page provides information about how to create a pipeline.
77

8-
.. node::
8+
9+
.. note::
910

1011
Pipelines run asynchronously, see examples below.
1112

12-
******************************
13+
14+
*******************
1315
Creating Components
14-
******************************
16+
*******************
1517

1618
Components are asynchronous units of work that perform simple tasks,
1719
such as chunking documents or saving results to Neo4j.

src/neo4j_genai/pipeline/exceptions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
from neo4j_genai.exceptions import Neo4jGenAiError
1516

1617

17-
class PipelineDefinitionError(Exception):
18+
class PipelineDefinitionError(Neo4jGenAiError):
1819
"""Raised when the pipeline graph is invalid"""
1920

2021
pass
2122

2223

23-
class PipelineMissingDependencyError(Exception):
24+
class PipelineMissingDependencyError(Neo4jGenAiError):
2425
"""Raised when a task is scheduled but its dependencies are not yet done"""
2526

2627
pass
2728

2829

29-
class PipelineStatusUpdateError(Exception):
30+
class PipelineStatusUpdateError(Neo4jGenAiError):
3031
"""Raises when trying an invalid change of state (e.g. DONE => DOING)"""
3132

3233
pass

0 commit comments

Comments
 (0)