Skip to content

Commit

Permalink
updated imports from use_cases to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesWesch committed Apr 30, 2024
1 parent 52d9f24 commit 7aaf158
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/intelligence_layer.use_cases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ intelligence\_layer.use\_cases package
Module contents
---------------

.. automodule:: intelligence_layer.use_cases
.. automodule:: intelligence_layer.examples
2 changes: 1 addition & 1 deletion src/documentation/classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"from dotenv import load_dotenv\n",
"\n",
"from intelligence_layer.core import InMemoryTracer, LogEntry, TextChunk\n",
"from intelligence_layer.use_cases import (\n",
"from intelligence_layer.examples import (\n",
" ClassifyInput,\n",
" EmbeddingBasedClassify,\n",
" LabelWithExamples,\n",
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/document_index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
" LimitedConcurrencyClient,\n",
")\n",
"from intelligence_layer.core import InMemoryTracer\n",
"from intelligence_layer.use_cases import RetrieverBasedQa, RetrieverBasedQaInput\n",
"from intelligence_layer.examples import RetrieverBasedQa, RetrieverBasedQaInput\n",
"\n",
"load_dotenv()"
]
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/evaluation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
" Runner,\n",
" evaluation_lineages_to_pandas,\n",
")\n",
"from intelligence_layer.use_cases import (\n",
"from intelligence_layer.examples import (\n",
" ClassifyInput,\n",
" EmbeddingBasedClassify,\n",
" LabelWithExamples,\n",
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/fastapi_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"metadata": {},
"outputs": [],
"source": [
"from intelligence_layer.use_cases import SteerableSingleChunkSummarize\n",
"from intelligence_layer.examples import SteerableSingleChunkSummarize\n",
"\n",
"\n",
"def summary_task(\n",
Expand All @@ -172,7 +172,7 @@
"outputs": [],
"source": [
"from intelligence_layer.core import NoOpTracer, Task\n",
"from intelligence_layer.use_cases import SingleChunkSummarizeInput, SummarizeOutput\n",
"from intelligence_layer.examples import SingleChunkSummarizeInput, SummarizeOutput\n",
"\n",
"\n",
"@app.post(\"/summary\")\n",
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/how_tos/how_to_implement_a_task.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
" Task,\n",
" TaskSpan,\n",
")\n",
"from intelligence_layer.use_cases import SingleChunkQa, SingleChunkQaInput\n",
"from intelligence_layer.examples import SingleChunkQa, SingleChunkQaInput\n",
"\n",
"load_dotenv()"
]
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/qa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
" LuminousControlModel,\n",
" NoOpTracer,\n",
")\n",
"from intelligence_layer.use_cases import (\n",
"from intelligence_layer.examples import (\n",
" LongContextQa,\n",
" LongContextQaInput,\n",
" MultipleChunkQa,\n",
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/summarization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
" NoOpTracer,\n",
" TextChunk,\n",
")\n",
"from intelligence_layer.use_cases import (\n",
"from intelligence_layer.examples import (\n",
" RecursiveSummarize,\n",
" RecursiveSummarizeInput,\n",
" SingleChunkSummarizeInput,\n",
Expand Down Expand Up @@ -220,7 +220,7 @@
"metadata": {},
"outputs": [],
"source": [
"from intelligence_layer.use_cases import LongContextSummarizeInput\n",
"from intelligence_layer.examples import LongContextSummarizeInput\n",
"\n",
"long_document = \"\"\"Plyscraper\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/core/tracer/composite_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CompositeTracer(Tracer, Generic[TracerVar]):
Example:
>>> from intelligence_layer.core import InMemoryTracer, FileTracer, CompositeTracer, TextChunk
>>> from intelligence_layer.use_cases import PromptBasedClassify, ClassifyInput
>>> from intelligence_layer.examples import PromptBasedClassify, ClassifyInput
>>> tracer_1 = InMemoryTracer()
>>> tracer_2 = InMemoryTracer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class QdrantSearch(Task[QdrantSearchInput, SearchOutput[int]]):
... QdrantInMemoryRetriever,
... )
>>> from intelligence_layer.core import InMemoryTracer
>>> from intelligence_layer.use_cases import (
>>> from intelligence_layer.examples import (
... QdrantSearch,
... QdrantSearchInput,
... )
Expand Down Expand Up @@ -131,8 +131,8 @@ class EmbeddingBasedClassify(Task[ClassifyInput, MultiLabelClassifyOutput]):
... LimitedConcurrencyClient,
... )
>>> from intelligence_layer.core import TextChunk, InMemoryTracer
>>> from intelligence_layer.use_cases.classify.classify import ClassifyInput
>>> from intelligence_layer.use_cases.classify.embedding_based_classify import (
>>> from intelligence_layer.examples.classify.classify import ClassifyInput
>>> from intelligence_layer.examples.classify.embedding_based_classify import (
... EmbeddingBasedClassify,
... LabelWithExamples,
... )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class PromptBasedClassify(Task[ClassifyInput, SingleLabelClassifyOutput]):
Example:
>>> from intelligence_layer.core import InMemoryTracer
>>> from intelligence_layer.core import TextChunk
>>> from intelligence_layer.use_cases import ClassifyInput
>>> from intelligence_layer.use_cases import PromptBasedClassify
>>> from intelligence_layer.examples import ClassifyInput
>>> from intelligence_layer.examples import PromptBasedClassify
>>> task = PromptBasedClassify()
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/examples/qa/long_context_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LongContextQa(Task[LongContextQaInput, MultipleChunkQaOutput]):
Example:
>>> from intelligence_layer.core import InMemoryTracer
>>> from intelligence_layer.use_cases import LongContextQa, LongContextQaInput
>>> from intelligence_layer.examples import LongContextQa, LongContextQaInput
>>> task = LongContextQa()
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/examples/qa/multiple_chunk_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class MultipleChunkQa(Task[MultipleChunkQaInput, MultipleChunkQaOutput]):
... )
>>> from intelligence_layer.core import Language, InMemoryTracer
>>> from intelligence_layer.core.chunk import TextChunk
>>> from intelligence_layer.use_cases import (
>>> from intelligence_layer.examples import (
... MultipleChunkQa,
... MultipleChunkQaInput,
... )
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/examples/qa/retriever_based_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RetrieverBasedQa(
>>> from intelligence_layer.connectors import DocumentIndexClient
>>> from intelligence_layer.connectors import DocumentIndexRetriever
>>> from intelligence_layer.core import InMemoryTracer
>>> from intelligence_layer.use_cases import RetrieverBasedQa, RetrieverBasedQaInput
>>> from intelligence_layer.examples import RetrieverBasedQa, RetrieverBasedQaInput
>>> token = os.getenv("AA_TOKEN")
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/examples/qa/single_chunk_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class SingleChunkQa(Task[SingleChunkQaInput, SingleChunkQaOutput]):
>>> import os
>>> from intelligence_layer.core import Language, InMemoryTracer
>>> from intelligence_layer.core import TextChunk
>>> from intelligence_layer.use_cases import SingleChunkQa, SingleChunkQaInput
>>> from intelligence_layer.examples import SingleChunkQa, SingleChunkQaInput
>>>
>>> task = SingleChunkQa()
>>> input = SingleChunkQaInput(
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/examples/search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Search(Generic[ID], Task[SearchInput, SearchOutput[ID]]):
... DocumentIndexRetriever,
... )
>>> from intelligence_layer.core import InMemoryTracer
>>> from intelligence_layer.use_cases import Search, SearchInput
>>> from intelligence_layer.examples import Search, SearchInput
>>> document_index = DocumentIndexClient(getenv("AA_TOKEN"))
Expand Down
2 changes: 1 addition & 1 deletion style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import requests # type: ignore
# Use 'type: ignore' for libraries that cause mypy issues (if there's no other fix).

# 3) Local application libraries
from intelligence_layer.use_cases.nested_task import NestedTask
from intelligence_layer.examples.nested_task import NestedTask
from intelligence_layer.core.task import Task
from intelligence_layer.core.tracer import Tracer

Expand Down

0 comments on commit 7aaf158

Please sign in to comment.