Skip to content

Commit 0f36747

Browse files
committed
fix(pre-commit-hooks,-Dockerfile,-notebook): - added pyright
1 parent da34592 commit 0f36747

File tree

3 files changed

+52
-45
lines changed

3 files changed

+52
-45
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ repos:
5959
- "app"
6060
- "tests"
6161
exclude: ^app/agent/.*
62-
# - repo: local
63-
# hooks:
64-
# - id: pyright
65-
# name: pyright
66-
# entry: pyright
67-
# language: system
68-
# types: [python]
62+
- repo: local
63+
hooks:
64+
- id: pyright
65+
name: pyright
66+
entry: pyright
67+
language: system
68+
types: [python]

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ RUN groupadd -r nonroot && useradd -r -g nonroot nonroot
1515
USER nonroot
1616

1717
CMD ["/code/.venv/bin/uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
18+
# To build the Docker image, use the following command:
19+
# docker build -t my-fastapi-app .
20+
21+
# To run the Docker container, use the following command:
22+
# docker run -p 8000:8000 my-fastapi-app
23+

notebook/poc.ipynb

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -724,31 +724,32 @@
724724
},
725725
{
726726
"cell_type": "code",
727-
"execution_count": 27,
727+
"execution_count": 1,
728728
"metadata": {},
729729
"outputs": [
730730
{
731731
"name": "stdout",
732732
"output_type": "stream",
733733
"text": [
734-
"['ABC',\n",
735-
" 'ALLOW_MODEL_REQUESTS',\n",
736-
" 'AsyncIterator',\n",
737-
" 'Iterator',\n",
738-
" 'KnownModelName',\n",
739-
" 'Literal',\n",
740-
" 'Model',\n",
741-
" 'ModelMessage',\n",
742-
" 'ModelRequestParameters',\n",
743-
" 'ModelResponse',\n",
744-
" 'ModelResponsePartsManager',\n",
745-
" 'ModelResponseStreamEvent',\n",
746-
" 'ModelSettings',\n",
747-
" 'StreamedResponse',\n",
748-
" 'TYPE_CHECKING',\n",
749-
" 'TypeAliasType',\n",
750-
" 'Usage',\n",
734+
"['Agent',\n",
735+
" 'AgentRunError',\n",
736+
" 'AudioUrl',\n",
737+
" 'BinaryContent',\n",
738+
" 'CallToolsNode',\n",
739+
" 'DocumentUrl',\n",
740+
" 'EndStrategy',\n",
741+
" 'FallbackExceptionGroup',\n",
742+
" 'ImageUrl',\n",
743+
" 'ModelHTTPError',\n",
744+
" 'ModelRequestNode',\n",
745+
" 'ModelRetry',\n",
746+
" 'RunContext',\n",
747+
" 'Tool',\n",
748+
" 'UnexpectedModelBehavior',\n",
749+
" 'UsageLimitExceeded',\n",
751750
" 'UserError',\n",
751+
" 'UserPromptNode',\n",
752+
" '__all__',\n",
752753
" '__builtins__',\n",
753754
" '__cached__',\n",
754755
" '__doc__',\n",
@@ -758,24 +759,24 @@
758759
" '__package__',\n",
759760
" '__path__',\n",
760761
" '__spec__',\n",
761-
" '_annotations',\n",
762-
" '_cached_async_http_client',\n",
763-
" '_cached_async_http_transport',\n",
764-
" 'abstractmethod',\n",
765-
" 'asynccontextmanager',\n",
766-
" 'cache',\n",
767-
" 'cached_async_http_client',\n",
768-
" 'check_allow_model_requests',\n",
769-
" 'contextmanager',\n",
770-
" 'dataclass',\n",
771-
" 'datetime',\n",
772-
" 'field',\n",
773-
" 'get_user_agent',\n",
774-
" 'httpx',\n",
775-
" 'infer_model',\n",
776-
" 'instrumented',\n",
777-
" 'override_allow_model_requests',\n",
778-
" 'wrapper']\n"
762+
" '__version__',\n",
763+
" '_agent_graph',\n",
764+
" '_griffe',\n",
765+
" '_parts_manager',\n",
766+
" '_pydantic',\n",
767+
" '_result',\n",
768+
" '_system_prompt',\n",
769+
" '_utils',\n",
770+
" 'agent',\n",
771+
" 'capture_run_messages',\n",
772+
" 'exceptions',\n",
773+
" 'messages',\n",
774+
" 'models',\n",
775+
" 'result',\n",
776+
" 'settings',\n",
777+
" 'tools',\n",
778+
" 'usage',\n",
779+
" 'version']\n"
779780
]
780781
}
781782
],
@@ -786,7 +787,7 @@
786787
"import pydantic_ai\n",
787788
"\n",
788789
"\n",
789-
"pprint.pprint(dir(pydantic_ai.models))"
790+
"pprint.pprint(dir(pydantic_ai))"
790791
]
791792
}
792793
],
@@ -806,7 +807,7 @@
806807
"name": "python",
807808
"nbconvert_exporter": "python",
808809
"pygments_lexer": "ipython3",
809-
"version": "3.10.12"
810+
"version": "3.12.2"
810811
}
811812
},
812813
"nbformat": 4,

0 commit comments

Comments
 (0)