mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-05 18:20:35 -08:00
Update pydantic_ai.md
This commit is contained in:
parent
229fc0e6e8
commit
a5a7458721
1 changed files with 3 additions and 3 deletions
|
|
@ -19,9 +19,9 @@ pip install g4f pydantic_ai
|
|||
|
||||
## Step-by-Step Setup
|
||||
|
||||
### 1. Patch G4F to Use PydanticAI Models
|
||||
### 1. Patch PydanticAI to Use G4F Models
|
||||
|
||||
In order to use PydanticAI models with G4F, you need to apply the necessary patch to the client. This can be done by importing `apply_patch` from `g4f.tools.pydantic_ai`. The `api_key` parameter is optional, so if you have one, you can provide it. If not, the system will proceed without it.
|
||||
In order to use PydanticAI with G4F models, you need to apply the necessary patch to the client. This can be done by importing `apply_patch` from `g4f.tools.pydantic_ai`. The `api_key` parameter is optional, so if you have one, you can provide it. If not, the system will proceed without it.
|
||||
|
||||
```python
|
||||
from g4f.tools.pydantic_ai import apply_patch
|
||||
|
|
@ -92,4 +92,4 @@ By following these steps, you have successfully integrated PydanticAI models int
|
|||
- Modify the agent’s `system_prompt` to suit the nature of the conversation you wish to have.
|
||||
- **Tool calls within AI requests are not fully supported** at the moment. Use the agent's basic functionality for generating responses and handle external calls separately.
|
||||
|
||||
For further customization and advanced use cases, refer to the G4F and PydanticAI documentation.
|
||||
For further customization and advanced use cases, refer to the G4F and PydanticAI documentation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue