Skip to content

Commit dcb523b

Browse files
feat(web-search): add DuckDuckGo search engine (#365)
* feat(web-search): add DuckDuckGo search engine * fix: configure a small retry on test engine to prevent rate limit for test * bump parent version * fix: tests and improve client parsing * add check for network availability
1 parent 8e457d0 commit dcb523b

File tree

11 files changed

+1001
-0
lines changed

11 files changed

+1001
-0
lines changed

langchain4j-community-bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@
143143
<version>${project.version}</version>
144144
</dependency>
145145

146+
<dependency>
147+
<groupId>dev.langchain4j</groupId>
148+
<artifactId>langchain4j-community-web-search-engine-duckduckgo</artifactId>
149+
<version>${project.version}</version>
150+
</dependency>
151+
146152
<!-- Spring Boot starters -->
147153
<dependency>
148154
<groupId>dev.langchain4j</groupId>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
<!-- Integration of web search engine -->
5959
<module>web-search-engines/langchain4j-community-web-search-engine-searxng</module>
60+
<module>web-search-engines/langchain4j-community-web-search-engine-duckduckgo</module>
6061

6162
<!-- Integration of document parsers -->
6263
<module>document-parsers/langchain4j-community-document-parser-llamaparse</module>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>dev.langchain4j</groupId>
7+
<artifactId>langchain4j-community</artifactId>
8+
<version>1.8.0-beta15-SNAPSHOT</version>
9+
<relativePath>../../pom.xml</relativePath>
10+
</parent>
11+
12+
<artifactId>langchain4j-community-web-search-engine-duckduckgo</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<name>LangChain4j :: Community :: Integration :: DuckDuckGo</name>
16+
17+
<licenses>
18+
<license>
19+
<name>Apache-2.0</name>
20+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
21+
<distribution>repo</distribution>
22+
<comments>A business-friendly OSS license</comments>
23+
</license>
24+
</licenses>
25+
26+
<properties>
27+
<skipDuckDuckGoITs>false</skipDuckDuckGoITs>
28+
<jsoup.version>1.17.2</jsoup.version>
29+
</properties>
30+
31+
<dependencies>
32+
33+
<dependency>
34+
<groupId>dev.langchain4j</groupId>
35+
<artifactId>langchain4j-core</artifactId>
36+
<version>${langchain4j.core.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>dev.langchain4j</groupId>
40+
<artifactId>langchain4j-http-client-jdk</artifactId>
41+
<version>${langchain4j.http-client-jdk.version}</version>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>org.jsoup</groupId>
46+
<artifactId>jsoup</artifactId>
47+
<version>${jsoup.version}</version>
48+
</dependency>
49+
50+
<dependency>
51+
<groupId>org.junit.jupiter</groupId>
52+
<artifactId>junit-jupiter</artifactId>
53+
<scope>test</scope>
54+
</dependency>
55+
56+
<dependency>
57+
<groupId>org.assertj</groupId>
58+
<artifactId>assertj-core</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
62+
<!-- Visibility for WebSearchEngineIT -->
63+
<dependency>
64+
<groupId>dev.langchain4j</groupId>
65+
<artifactId>langchain4j-core</artifactId>
66+
<version>${langchain4j.core.version}</version>
67+
<classifier>tests</classifier>
68+
<type>test-jar</type>
69+
<scope>test</scope>
70+
</dependency>
71+
72+
<dependency>
73+
<groupId>org.tinylog</groupId>
74+
<artifactId>tinylog-impl</artifactId>
75+
<scope>test</scope>
76+
</dependency>
77+
78+
<dependency>
79+
<groupId>org.tinylog</groupId>
80+
<artifactId>slf4j-tinylog</artifactId>
81+
<scope>test</scope>
82+
</dependency>
83+
84+
</dependencies>
85+
86+
<build>
87+
<plugins>
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-failsafe-plugin</artifactId>
91+
<configuration>
92+
<skipTests>${skipDuckDuckGoITs}</skipTests>
93+
</configuration>
94+
</plugin>
95+
</plugins>
96+
</build>
97+
98+
</project>

0 commit comments

Comments
 (0)