Skip to content

Commit aa6a76e

Browse files
authored
docs: added first ollama example
1 parent 93df56c commit aa6a76e

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

README.md

+26-12
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ from scrapegraphai.graphs import SmartScraperGraph
5151
# Define the configuration for the scraping pipeline
5252
graph_config = {
5353
"llm": {
54-
"api_key": "YOUR_OPENAI_API_KEY",
55-
"model": "openai/gpt-4o-mini",
54+
"model": "ollama/llama3.2",
55+
"model_tokens": 8192
5656
},
5757
"verbose": True,
5858
"headless": False,
@@ -72,6 +72,20 @@ import json
7272
print(json.dumps(result, indent=4))
7373
```
7474

75+
> [!NOTE]
76+
> For OpenAI and other models you just need to change the llm config!
77+
> ```python
78+
>graph_config = {
79+
> "llm": {
80+
> "api_key": "YOUR_OPENAI_API_KEY",
81+
> "model": "openai/gpt-4o-mini",
82+
> },
83+
> "verbose": True,
84+
> "headless": False,
85+
>}
86+
>```
87+
88+
7589
The output will be a dictionary like the following:
7690
7791
```python
@@ -126,6 +140,16 @@ Remember to have [Ollama](https://ollama.com/) installed and download the models
126140
The documentation for ScrapeGraphAI can be found [here](https://scrapegraph-ai.readthedocs.io/en/latest/).
127141
Check out also the Docusaurus [here](https://docs-oss.scrapegraphai.com/).
128142

143+
## 🤝 Contributing
144+
145+
Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!
146+
147+
Please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
148+
149+
[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/uJN7TYcpNa)
150+
[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)
151+
[![My Skills](https://skillicons.dev/icons?i=twitter)](https://twitter.com/scrapegraphai)
152+
129153
## 🔗 ScrapeGraph API & SDKs
130154
If you are looking for a quick solution to integrate ScrapeGraph in your system, check out our powerful API [here!](https://dashboard.scrapegraphai.com/login)
131155

@@ -158,16 +182,6 @@ The Official API Documentation can be found [here](https://docs.scrapegraphai.co
158182
</a>
159183
</div>
160184

161-
## 🤝 Contributing
162-
163-
Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!
164-
165-
Please see the [contributing guidelines](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
166-
167-
[![My Skills](https://skillicons.dev/icons?i=discord)](https://discord.gg/uJN7TYcpNa)
168-
[![My Skills](https://skillicons.dev/icons?i=linkedin)](https://www.linkedin.com/company/scrapegraphai/)
169-
[![My Skills](https://skillicons.dev/icons?i=twitter)](https://twitter.com/scrapegraphai)
170-
171185
## 📈 Telemetry
172186
We collect anonymous usage metrics to enhance our package's quality and user experience. The data helps us prioritize improvements and ensure compatibility. If you wish to opt-out, set the environment variable SCRAPEGRAPHAI_TELEMETRY_ENABLED=false. For more information, please refer to the documentation [here](https://scrapegraph-ai.readthedocs.io/en/latest/scrapers/telemetry.html).
173187

0 commit comments

Comments
 (0)