linkup-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/package.json +54 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Linkup Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # 🚀 Linkup JS/TS SDK
2
+
3
+ [![npm package](https://badge.fury.io/js/linkup-sdk.svg)](https://www.npmjs.com/package/linkup-sdk)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+
6
+ A JS/TS SDK for the [Linkup API](https://linkup-api.readme.io/reference/getting-started), allowing
7
+ easy integration with Linkup's services. 🐍
8
+
9
+ ## 🌟 Features
10
+
11
+ - ✅ **Simple and intuitive API client.**
12
+ - 🔍 **Supports both standard and deep search queries.**
13
+ - 🔒 **Handles authentication and request management.**
14
+
15
+ ## 📦 Installation
16
+
17
+ Simply install the Linkup JS SDK using `npm` or any other package manager:
18
+
19
+ ```bash
20
+ npm i linkup-sdk
21
+ ```
22
+
23
+ ## 🛠️ Usage
24
+
25
+ ### Setting Up Your Environment
26
+
27
+ #### 1. **🔑 Obtain an API Key:**
28
+
29
+ Sign up on [Linkup](https://app.linkup.so) to get your API key.
30
+
31
+ #### 2. **⚙️ Set-up the API Key:**
32
+
33
+ Pass the Linkup API key to the Linkup Client when creating it.
34
+
35
+ ```typescript
36
+ import { LinkupClient } from 'linkup-sdk';
37
+
38
+ const client = new LinkupClient({
39
+ apiKey: '<YOUR API KEY>',
40
+ });
41
+ ```
42
+
43
+ ### 📋 Examples
44
+
45
+ All search queries can be used with two very different modes:
46
+
47
+ - with `standard` `depth`, the search will be straightforward and fast, suited for relatively simple
48
+ queries (e.g. "What's the weather in Paris today?")
49
+ - with `deep` `depth`, the search will use an agentic workflow, which makes it in general slower,
50
+ but it will be able to solve more complex queries (e.g. "What is the company profile of LangChain
51
+ accross the last few years, and how does it compare to its concurrents?")
52
+
53
+ #### 📝 Standard Search Query
54
+
55
+ ```typescript
56
+ import { LinkupClient } from 'linkup-js-sdk';
57
+
58
+ const client = new LinkupClient({
59
+ apiKey: '<YOUR API KEY>',
60
+ });
61
+
62
+ const askLinkup = async () => {
63
+ return await client.search({
64
+ query: 'Can you tell me which women were awared the Physics Nobel Prize',
65
+ depth: 'standard',
66
+ outputType: 'sourcedAnswer',
67
+ });
68
+ };
69
+
70
+ askLinkup().then(console.log);
71
+ ```
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "linkup-sdk",
3
+ "version": "1.0.0",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "watch": "tsc --watch",
9
+ "test": "jest",
10
+ "lint": "eslint src/**/*.ts",
11
+ "format": "prettier --write \"src/**/*.ts\""
12
+ },
13
+ "keywords": [
14
+ "linkup",
15
+ "llm",
16
+ "nodejs",
17
+ "api",
18
+ "sdk",
19
+ "client",
20
+ "search"
21
+ ],
22
+ "author": "Linkup",
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/LinkupPlatform/linkup-js-sdk"
27
+ },
28
+ "description": "A Javascript Client SDK for the Linkup API",
29
+ "files": [
30
+ "dist/**/*"
31
+ ],
32
+ "devDependencies": {
33
+ "@eslint/eslintrc": "^3.2.0",
34
+ "@eslint/js": "^9.17.0",
35
+ "@types/jest": "^29.5.14",
36
+ "@types/node-fetch": "^2.6.4",
37
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
38
+ "@typescript-eslint/parser": "^8.16.0",
39
+ "eslint": "^9.15.0",
40
+ "eslint-config-prettier": "^9.1.0",
41
+ "eslint-plugin-prettier": "^5.2.1",
42
+ "globals": "^15.13.0",
43
+ "jest": "^29.7.0",
44
+ "prettier": "^3.4.1",
45
+ "ts-jest": "^29.2.5",
46
+ "ts-node": "^10.9.2",
47
+ "typescript": "^5.7.2"
48
+ },
49
+ "dependencies": {
50
+ "axios": "^1.7.9",
51
+ "zod": "^3.24.1",
52
+ "zod-to-json-schema": "^3.24.1"
53
+ }
54
+ }