Skip to content

Commit 735120d

Browse files
authored
Merge branch 'screenshot-scraper-fix' into pre/beta
2 parents 55a7727 + d7f6036 commit 735120d

File tree

141 files changed

+1839
-841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1839
-841
lines changed

CHANGELOG.md

Lines changed: 165 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,129 @@
1-
## [1.15.0-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.1-beta.1...v1.15.0-beta.1) (2024-08-23)
1+
## [1.16.0-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.1...v1.16.0-beta.1) (2024-08-28)
2+
3+
4+
### Features
5+
6+
* add togheterai ([8f615ad](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/8f615adef320dacdd214a184981384dd05df8171))
7+
8+
9+
### chore
10+
11+
* **examples:** create Together AI examples ([34942de](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/34942deca514df53e8aa1c7f96f812ee78b994bf))
12+
13+
## [1.15.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0...v1.15.1) (2024-08-28)
14+
15+
16+
### Bug Fixes
17+
18+
* abstract graph local model ([04128e7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/04128e7e9f585aaf774fabf646c4d9d3b96b8333))
19+
* **models:** better DeepSeek and OneApi integration ([f7a85c2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f7a85c266ae758cc16297ebc5d98f8919a80c523))
20+
* **docloaders:** BrowserBase dynamic import ([5c16ee9](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5c16ee985b11948c6a8c1dbfd051d458fa193973))
21+
* bug for abstract graph ([cf73883](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf73883451729b19034005ee7ebe618c1e256a11))
22+
* **AbstractGraph:** correct and simplify instancing logic ([f73343f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f73343f19386b31878706963597c2565a023068d))
23+
* **BurrBrige:** dynamic imports ([7789663](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/7789663338a89d27fde322ae282ce07ccca16845))
24+
* **AbstractGraph:** model selection bug ([4f120e2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/4f120e29c546373a2cc06c102cc9886cc5270c06))
25+
* set up dynamic imports correctly ([83e71df](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/83e71df2e2cb3b6bfba11f8879d5c4917a3e1837))
26+
27+
28+
### chore
29+
30+
* **examples:** update model names ([f6df9b7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f6df9b75125b4cacbef4af29faf3e17a13ff108c))
31+
* update README.md ([5f562b8](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5f562b89bd63eba1300afe98572f152a0621b370))
32+
33+
34+
### Test
35+
36+
* **AbstractGraph:** add AbstractGraph tests ([229d74d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/229d74d4bd39befa3723fa2841e23d40007a9772))
37+
38+
39+
### CI
40+
41+
* **release:** 1.15.0-beta.4 [skip ci] ([c1ce9c6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/c1ce9c69d4ba746d488891d18fa64460e76124bf))
42+
* **release:** 1.15.0-beta.5 [skip ci] ([22ab45f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/22ab45f6bda3a12ab01c743fd124448a2e26cd46))
43+
* **release:** 1.15.0-beta.6 [skip ci] ([050fa3f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/050fa3faa02cb2a86ce7c0f61c99e4fa8cf3f9a5))
44+
* **release:** 1.15.0-beta.7 [skip ci] ([be3f1ec](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/be3f1ec58d6354d583401f51f310f6aac987a393))
45+
* **release:** 1.15.0-beta.8 [skip ci] ([dbec550](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/dbec55064feac8dfe01290bf82b5b47b013b589d))
46+
* **release:** 1.15.1-beta.1 [skip ci] ([8f38a6b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/8f38a6bf15c2138471d7bdb9e0236f02389d93bb))
47+
48+
## [1.15.1-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0...v1.15.1-beta.1) (2024-08-28)
49+
50+
51+
### Bug Fixes
52+
53+
* abstract graph local model ([04128e7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/04128e7e9f585aaf774fabf646c4d9d3b96b8333))
54+
* **models:** better DeepSeek and OneApi integration ([f7a85c2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f7a85c266ae758cc16297ebc5d98f8919a80c523))
55+
* **docloaders:** BrowserBase dynamic import ([5c16ee9](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5c16ee985b11948c6a8c1dbfd051d458fa193973))
56+
* bug for abstract graph ([cf73883](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf73883451729b19034005ee7ebe618c1e256a11))
57+
* **AbstractGraph:** correct and simplify instancing logic ([f73343f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f73343f19386b31878706963597c2565a023068d))
58+
* **BurrBrige:** dynamic imports ([7789663](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/7789663338a89d27fde322ae282ce07ccca16845))
59+
* **AbstractGraph:** model selection bug ([4f120e2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/4f120e29c546373a2cc06c102cc9886cc5270c06))
60+
* set up dynamic imports correctly ([83e71df](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/83e71df2e2cb3b6bfba11f8879d5c4917a3e1837))
61+
62+
63+
### chore
64+
65+
* **examples:** update model names ([f6df9b7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f6df9b75125b4cacbef4af29faf3e17a13ff108c))
66+
* update README.md ([5f562b8](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5f562b89bd63eba1300afe98572f152a0621b370))
67+
68+
69+
### Test
70+
71+
* **AbstractGraph:** add AbstractGraph tests ([229d74d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/229d74d4bd39befa3723fa2841e23d40007a9772))
72+
73+
74+
### CI
75+
76+
* **release:** 1.15.0-beta.4 [skip ci] ([c1ce9c6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/c1ce9c69d4ba746d488891d18fa64460e76124bf))
77+
* **release:** 1.15.0-beta.5 [skip ci] ([22ab45f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/22ab45f6bda3a12ab01c743fd124448a2e26cd46))
78+
* **release:** 1.15.0-beta.6 [skip ci] ([050fa3f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/050fa3faa02cb2a86ce7c0f61c99e4fa8cf3f9a5))
79+
* **release:** 1.15.0-beta.7 [skip ci] ([be3f1ec](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/be3f1ec58d6354d583401f51f310f6aac987a393))
80+
* **release:** 1.15.0-beta.8 [skip ci] ([dbec550](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/dbec55064feac8dfe01290bf82b5b47b013b589d))
81+
82+
## [1.15.0-beta.8](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.7...v1.15.0-beta.8) (2024-08-28)
83+
84+
85+
### Bug Fixes
86+
87+
* **models:** better DeepSeek and OneApi integration ([f7a85c2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f7a85c266ae758cc16297ebc5d98f8919a80c523))
88+
* **AbstractGraph:** model selection bug ([4f120e2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/4f120e29c546373a2cc06c102cc9886cc5270c06))
89+
90+
## [1.15.0-beta.7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.6...v1.15.0-beta.7) (2024-08-27)
91+
92+
93+
### Bug Fixes
94+
95+
* bug for abstract graph ([cf73883](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf73883451729b19034005ee7ebe618c1e256a11))
96+
97+
## [1.15.0-beta.6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.5...v1.15.0-beta.6) (2024-08-27)
98+
99+
100+
### Bug Fixes
101+
102+
* **docloaders:** BrowserBase dynamic import ([5c16ee9](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5c16ee985b11948c6a8c1dbfd051d458fa193973))
103+
* **AbstractGraph:** correct and simplify instancing logic ([f73343f](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f73343f19386b31878706963597c2565a023068d))
104+
* **BurrBrige:** dynamic imports ([7789663](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/7789663338a89d27fde322ae282ce07ccca16845))
105+
* set up dynamic imports correctly ([83e71df](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/83e71df2e2cb3b6bfba11f8879d5c4917a3e1837))
106+
107+
108+
### chore
109+
110+
* **examples:** update model names ([f6df9b7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f6df9b75125b4cacbef4af29faf3e17a13ff108c))
111+
112+
113+
### Test
114+
115+
* **AbstractGraph:** add AbstractGraph tests ([229d74d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/229d74d4bd39befa3723fa2841e23d40007a9772))
116+
117+
## [1.15.0-beta.5](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.4...v1.15.0-beta.5) (2024-08-26)
118+
119+
120+
### Bug Fixes
121+
122+
* abstract graph local model ([04128e7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/04128e7e9f585aaf774fabf646c4d9d3b96b8333))
123+
124+
## [1.15.0-beta.4](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.3...v1.15.0-beta.4) (2024-08-26)
125+
126+
## [1.15.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.1...v1.15.0) (2024-08-26)
2127

3128

4129
### Features
@@ -8,15 +133,52 @@
8133

9134
### Bug Fixes
10135

136+
* abstract graph ([cf1fada](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf1fada36a6716cb0e24bbc5da7509446a964145))
137+
* **models_tokens:** add llama2 and llama3 sizes explicitly ([b05ec16](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b05ec16b252d00c9c9ee7c6d4605b420851c7754))
11138
* Azure OpenAI issue ([a92b9c6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/a92b9c6970049a4ba9dbdf8eff3eeb7f98c6c639))
139+
* update abstract graph ([86fe5fc](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/86fe5fcaf1a6ba28786678874378f07fba1db40f))
12140

13-
## [1.14.1-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.0...v1.14.1-beta.1) (2024-08-21)
141+
142+
### CI
143+
144+
* **release:** 1.14.1-beta.1 [skip ci] ([1b48871](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/1b488715e698888423eb65f43fdf768bb0729602))
145+
* **release:** 1.15.0-beta.1 [skip ci] ([06dc640](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/06dc640d44449d1b394829e546a64e38a3d3629e))
146+
* **release:** 1.15.0-beta.2 [skip ci] ([ab21576](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ab215764353773c5303b88743c6cca4fa7e1b52e))
147+
* **release:** 1.15.0-beta.3 [skip ci] ([132ee5b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/132ee5b7daf36ef376bfbc63bc6dc7f2332fdd6b))
14148

15149

16150
### Bug Fixes
17151

18-
* **models_tokens:** add llama2 and llama3 sizes explicitly ([b05ec16](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b05ec16b252d00c9c9ee7c6d4605b420851c7754))
152+
* add claude3.5 sonnet ([ee8f8b3](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ee8f8b31ecfe4ffd311528d2f48cb055e4609d99))
153+
154+
155+
### CI
156+
157+
* **release:** 1.14.1 [skip ci] ([88e76ce](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/88e76ceedb39dc1b41222e9a5cb8a6f0d81cadf4))
158+
159+
## [1.14.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.0...v1.14.1) (2024-08-24)
160+
161+
162+
163+
### Bug Fixes
164+
165+
166+
* update abstract graph ([86fe5fc](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/86fe5fcaf1a6ba28786678874378f07fba1db40f))
167+
168+
## [1.15.0-beta.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0-beta.1...v1.15.0-beta.2) (2024-08-23)
169+
170+
171+
### Bug Fixes
172+
173+
* abstract graph ([cf1fada](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf1fada36a6716cb0e24bbc5da7509446a964145))
174+
175+
176+
### Docs
177+
178+
* added sponsors ([b3a2d0d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b3a2d0d65a41f6e645fac3fc84f702fdf64b951c))
179+
19180

181+
#
20182
## [1.14.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.3...v1.14.0) (2024-08-20)
21183

22184

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ playwright install
3232

3333
**Note**: it is recommended to install the library in a virtual environment to avoid conflicts with other libraries 🐱
3434

35+
By the way if you to use not mandatory modules it is necessary to install by yourself with the following command:
36+
37+
### Installing "Other Language Models"
38+
39+
This group allows you to use additional language models like Fireworks, Groq, Anthropic, Together AI, Hugging Face, and Nvidia AI Endpoints.
40+
```bash
41+
pip install scrapegraphai[other-language-models]
42+
43+
```
44+
### Installing "More Semantic Options"
45+
46+
This group includes tools for advanced semantic processing, such as Graphviz.
47+
```bash
48+
pip install scrapegraphai[more-semantic-options]
49+
```
50+
### Installing "More Browser Options"
51+
52+
This group includes additional browser management options, such as BrowserBase.
53+
```bash
54+
pip install scrapegraphai[more-browser-options]
55+
```
56+
3557
## 💻 Usage
3658
There are multiple standard scraping pipelines that can be used to extract information from a website (or local file).
3759

@@ -46,7 +68,7 @@ from scrapegraphai.graphs import SmartScraperGraph
4668
graph_config = {
4769
"llm": {
4870
"api_key": "YOUR_OPENAI_APIKEY",
49-
"model": "gpt-4o-mini",
71+
"model": "openai/gpt-4o-mini",
5072
},
5173
"verbose": True,
5274
"headless": False,
@@ -104,6 +126,15 @@ The documentation for ScrapeGraphAI can be found [here](https://scrapegraph-ai.r
104126

105127
Check out also the Docusaurus [here](https://scrapegraph-doc.onrender.com/).
106128

129+
## 🏆 Sponsors
130+
<div style="text-align: center;">
131+
<a href="https://2ly.link/1zNiz">
132+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/serp_api_logo.png" alt="SerpAPI" style="width: 10%;">
133+
</a>
134+
<a href="https://2ly.link/1zNj1">
135+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/transparent_stat.png" alt="Stats" style="width: 15%;">
136+
</a>
137+
</div>
107138

108139
## 🤝 Contributing
109140

docs/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ markmap:
3333
- Make graphs run in parallel
3434
- Scrape only relevant URLs from user prompt
3535
- Use the multi dimensional DOM tree of the website for retrieval
36-
- [Issue #112](https://github.com/VinciGit00/Scrapegraph-ai/issues/112)
3736

3837
- Crawler graph
3938
- Scrape all the URLs with the same domain in all the pages
@@ -61,4 +60,4 @@ markmap:
6160

6261
- Automatic generation of scraping pipelines from a given prompt
6362

64-
- Create API for the library
63+
- Create API for the library

examples/anthropic/csv_scraper_graph_multi_haiku.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
graph_config = {
2727
"llm": {
2828
"api_key": os.getenv("ANTHROPIC_API_KEY"),
29-
"model": "claude-3-haiku-20240307",
30-
"max_tokens": 4000},
29+
"model": "anthropic/claude-3-haiku-20240307",
30+
},
3131
}
3232

3333
# ************************************************

examples/anthropic/csv_scraper_haiku.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
graph_config = {
3333
"llm": {
3434
"api_key": os.getenv("ANTHROPIC_API_KEY"),
35-
"model": "claude-3-haiku-20240307",
36-
"max_tokens": 4000
37-
},
35+
"model": "anthropic/claude-3-haiku-20240307",
36+
},
3837
}
3938

4039
# ************************************************

examples/anthropic/custom_graph_haiku.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import os
66
from dotenv import load_dotenv
77

8-
from langchain_openai import OpenAIEmbeddings
9-
from langchain_openai import ChatOpenAI
8+
from langchain_anthropic import ChatAnthropic
109
from scrapegraphai.graphs import BaseGraph
11-
from scrapegraphai.nodes import FetchNode, ParseNode, RAGNode, GenerateAnswerNode, RobotsNode
10+
from scrapegraphai.nodes import FetchNode, ParseNode, GenerateAnswerNode, RobotsNode
1211
load_dotenv()
1312

1413
# ************************************************
@@ -19,16 +18,14 @@
1918
"llm": {
2019
"api_key": os.getenv("ANTHROPIC_API_KEY"),
2120
"model": "claude-3-haiku-20240307",
22-
"max_tokens": 4000
23-
},
21+
},
2422
}
2523

2624
# ************************************************
2725
# Define the graph nodes
2826
# ************************************************
2927

30-
llm_model = OpenAI(graph_config["llm"])
31-
embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)
28+
llm_model = ChatAnthropic(graph_config["llm"])
3229

3330
# define the nodes for the graph
3431
robot_node = RobotsNode(
@@ -57,15 +54,6 @@
5754
"verbose": True,
5855
}
5956
)
60-
rag_node = RAGNode(
61-
input="user_prompt & (parsed_doc | doc)",
62-
output=["relevant_chunks"],
63-
node_config={
64-
"llm_model": llm_model,
65-
"embedder_model": embedder,
66-
"verbose": True,
67-
}
68-
)
6957
generate_answer_node = GenerateAnswerNode(
7058
input="user_prompt & (relevant_chunks | parsed_doc | doc)",
7159
output=["answer"],
@@ -84,14 +72,12 @@
8472
robot_node,
8573
fetch_node,
8674
parse_node,
87-
rag_node,
8875
generate_answer_node,
8976
],
9077
edges=[
9178
(robot_node, fetch_node),
9279
(fetch_node, parse_node),
93-
(parse_node, rag_node),
94-
(rag_node, generate_answer_node)
80+
(parse_node, generate_answer_node)
9581
],
9682
entry_point=robot_node
9783
)

examples/anthropic/json_scraper_haiku.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
graph_config = {
2727
"llm": {
2828
"api_key": os.getenv("ANTHROPIC_API_KEY"),
29-
"model": "claude-3-haiku-20240307",
30-
"max_tokens": 4000
31-
},
29+
"model": "anthropic/claude-3-haiku-20240307",
30+
},
3231
}
3332

3433
# ************************************************

examples/anthropic/json_scraper_multi_haiku.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
graph_config = {
1212
"llm": {
1313
"api_key": os.getenv("ANTHROPIC_API_KEY"),
14-
"model": "claude-3-haiku-20240307",
15-
"max_tokens": 4000
16-
},
14+
"model": "anthropic/claude-3-haiku-20240307",
15+
},
1716
}
1817

1918
FILE_NAME = "inputs/example.json"

examples/anthropic/pdf_scraper_graph_haiku.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
graph_config = {
1515
"llm": {
1616
"api_key": os.getenv("ANTHROPIC_API_KEY"),
17-
"model": "claude-3-haiku-20240307",
18-
"max_tokens": 4000
19-
},
17+
"model": "anthropic/claude-3-haiku-20240307",
18+
},
2019
}
2120

2221
source = """

examples/anthropic/pdf_scraper_multi_haiku.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
graph_config = {
1212
"llm": {
1313
"api_key": os.getenv("ANTHROPIC_API_KEY"),
14-
"model": "claude-3-haiku-20240307",
15-
"max_tokens": 4000
16-
},
14+
"model": "anthropic/claude-3-haiku-20240307",
15+
},
1716
}
1817

1918
# ***************

0 commit comments

Comments
 (0)