pull/657/head
Travis Fischer 2024-08-04 00:18:08 -05:00
rodzic a7647b893e
commit ee71534959
74 zmienionych plików z 5429 dodań i 131 usunięć

Wyświetl plik

@ -37,7 +37,8 @@
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*"
"@agentic/tsconfig": "workspace:*",
"ai": "^3.1.30"
},
"publishConfig": {
"access": "public"

Wyświetl plik

@ -0,0 +1,47 @@
{
"name": "@agentic/bing",
"version": "6.6.1",
"description": "Agentic Bing search SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit"
},
"dependencies": {
"ky": "^1.5.0"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"zod": "^3.23.3"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -1,9 +1,13 @@
import {
aiFunction,
AIFunctionsProvider,
assert,
getEnv,
omit
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, omit } from '../utils'
export namespace bing {
export const API_BASE_URL = 'https://api.bing.microsoft.com'

Wyświetl plik

@ -0,0 +1 @@
export * from './bing-client'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -0,0 +1,48 @@
{
"name": "@agentic/calculator",
"version": "6.6.1",
"description": "Agentic calculator tool wrapping mathjs.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit"
},
"dependencies": {
"ky": "^1.5.0",
"mathjs": "^13.0.3"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"zod": "^3.23.3"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1 @@
export * from './calculator'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -0,0 +1,48 @@
{
"name": "@agentic/clearbit",
"version": "6.6.1",
"description": "Agentic Clearbit SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit"
},
"dependencies": {
"ky": "^1.5.0",
"p-throttle": "^6.1.0"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"zod": "^3.23.3"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -1,7 +1,3 @@
import defaultKy from 'ky'
import pThrottle from 'p-throttle'
import type { KyInstance } from '../types'
import {
assert,
delay,
@ -9,7 +5,9 @@ import {
pruneNullOrUndefinedDeep,
sanitizeSearchParams,
throttleKy
} from '../utils'
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
export namespace clearbit {
// Allow up to 600 requests per minute by default.

Wyświetl plik

@ -0,0 +1 @@
export * from './clearbit-client'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -0,0 +1,48 @@
{
"name": "@agentic/dexa",
"version": "6.6.1",
"description": "Agentic Dexa SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit"
},
"dependencies": {
"ky": "^1.5.0",
"p-throttle": "^6.1.0"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"zod": "^3.23.3"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -1,10 +1,13 @@
import {
aiFunction,
AIFunctionsProvider,
assert,
getEnv,
Msg
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { Msg } from '../message'
import { assert, getEnv } from '../utils'
export namespace dexa {
export const AskDexaOptionsSchema = z.object({
question: z.string().describe('The question to ask Dexa.')

Wyświetl plik

@ -0,0 +1,2 @@
export * from './dexa-client'
export * from './scraper-client'

Wyświetl plik

@ -1,10 +1,15 @@
import {
aiFunction,
AIFunctionsProvider,
assert,
getEnv,
omit,
throttleKy
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, omit, throttleKy } from '../utils'
export namespace scraper {
// Allow up to 1 request per second by default.
export const throttle = pThrottle({

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -0,0 +1,46 @@
{
"name": "@agentic/dexter",
"version": "6.6.1",
"description": "Agentic adapter for the Dexter AI SDK by Dexa.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"@dexaai/dexter": "^2.1.0"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*",
"@dexaai/dexter": "^2.1.0"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1,10 @@
import { EchoAITool } from '@agentic/core'
import { describe, expect, test } from 'vitest'
import { createDexterFunctions } from './dexter'
describe('dexter', () => {
test('createDexterFunctions', () => {
expect(createDexterFunctions(new EchoAITool())).toHaveLength(1)
})
})

Wyświetl plik

@ -1,8 +1,6 @@
import { type AIFunctionLike, AIFunctionSet } from '@agentic/core'
import { createAIFunction } from '@dexaai/dexter'
import type { AIFunctionLike } from '../types'
import { AIFunctionSet } from '../ai-function-set'
/**
* Converts a set of Agentic stdlib AI functions to an array of Dexter-
* compatible AI functions.

Wyświetl plik

@ -0,0 +1 @@
export * from './dexter'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -1,10 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, sanitizeSearchParams, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils'
export namespace diffbot {
export const API_BASE_URL = 'https://api.diffbot.com'
export const KNOWLEDGE_GRAPH_API_BASE_URL = 'https://kg.diffbot.com'

Wyświetl plik

@ -1,8 +1,8 @@
import { getEnv } from '@agentic/core'
import { CodeInterpreter, type ProcessMessage } from '@e2b/code-interpreter'
import { z } from 'zod'
import { createAIFunction } from '../create-ai-function'
import { getEnv } from '../utils'
/**
* E2B Python code interpreter sandbox.

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, pruneUndefined } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, pruneUndefined } from '../utils'
export namespace exa {
export const TextContentsOptionsSchema = z.object({
maxCharacters: z

Wyświetl plik

@ -1,10 +1,9 @@
import { aiFunction, AIFunctionsProvider , assert, delay, getEnv, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import z from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { isZodSchema } from '../schema'
import { assert, delay, getEnv, throttleKy } from '../utils'
import { zodToJsonSchema } from '../zod-to-json-schema'
export namespace firecrawl {

Wyświetl plik

@ -0,0 +1,46 @@
{
"name": "@agentic/genkit",
"version": "6.6.1",
"description": "Agentic adapter for the Firebase Genkit AI SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"@genkit-ai/ai": "^0.5.9"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*",
"@genkit-ai/ai": "^0.5.9"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1,10 @@
import { EchoAITool } from '@agentic/core'
import { describe, expect, test } from 'vitest'
import { createGenkitTools } from './genkit'
describe('genkit', () => {
test('createGenkitTools', () => {
expect(createGenkitTools(new EchoAITool())).toHaveLength(1)
})
})

Wyświetl plik

@ -1,9 +1,7 @@
import { type AIFunctionLike, AIFunctionSet } from '@agentic/core'
import { defineTool } from '@genkit-ai/ai'
import { z } from 'zod'
import type { AIFunctionLike } from '../types'
import { AIFunctionSet } from '../ai-function-set'
/**
* Converts a set of Agentic stdlib AI functions to an array of Genkit-
* compatible tools.

Wyświetl plik

@ -0,0 +1 @@
export * from './genkit'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -1,8 +1,6 @@
import { AIFunctionsProvider , assert, getEnv } from '@agentic/core'
import { Octokit } from 'octokit'
import { AIFunctionsProvider } from '../fns'
import { assert, getEnv } from '../utils'
export namespace github {
export interface User {
id: number

Wyświetl plik

@ -1,8 +1,6 @@
import { AIFunctionsProvider , assert, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { AIFunctionsProvider } from '../fns'
import { assert, getEnv } from '../utils'
export namespace hackernews {
export type ItemType =
| 'story'

Wyświetl plik

@ -1,13 +1,11 @@
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import {
import { aiFunction, AIFunctionsProvider ,
assert,
getEnv,
pruneNullOrUndefinedDeep,
sanitizeSearchParams
} from '../utils'
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
export namespace hunter {
export const API_BASE_URL = 'https://api.hunter.io'

Wyświetl plik

@ -1,10 +1,8 @@
import { aiFunction, AIFunctionsProvider , getEnv, pruneNullOrUndefined, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { getEnv, pruneNullOrUndefined, throttleKy } from '../utils'
export namespace jina {
export const ReaderFormatSchema = z.enum([
'text',

Wyświetl plik

@ -0,0 +1,46 @@
{
"name": "@agentic/langchain",
"version": "6.6.1",
"description": "Agentic adapter for the LangChain AI SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"@langchain/core": "^0.2.20"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*",
"@langchain/core": "^0.2.20"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1 @@
export * from './langchain'

Wyświetl plik

@ -0,0 +1,10 @@
import { EchoAITool } from '@agentic/core'
import { describe, expect, test } from 'vitest'
import { createLangChainTools } from './langchain'
describe('langchain', () => {
test('createLangChainTools', () => {
expect(createLangChainTools(new EchoAITool())).toHaveLength(1)
})
})

Wyświetl plik

@ -1,9 +1,10 @@
import {
type AIFunctionLike,
AIFunctionSet,
stringifyForModel
} from '@agentic/core'
import { DynamicStructuredTool } from '@langchain/core/tools'
import type { AIFunctionLike } from '../types'
import { AIFunctionSet } from '../ai-function-set'
import { stringifyForModel } from '../utils'
/**
* Converts a set of Agentic stdlib AI functions to an array of LangChain-
* compatible tools.

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -0,0 +1,46 @@
{
"name": "@agentic/llamaindex",
"version": "6.6.1",
"description": "Agentic adapter for the LlamaIndex AI SDK.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic.git"
},
"type": "module",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "del dist",
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"peerDependencies": {
"@agentic/core": "workspace:*",
"llamaindex": "^0.5.13"
},
"devDependencies": {
"@agentic/core": "workspace:*",
"@agentic/tsconfig": "workspace:*",
"llamaindex": "^0.5.13"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1 @@
export * from './llamaindex'

Wyświetl plik

@ -0,0 +1,10 @@
import { EchoAITool } from '@agentic/core'
import { describe, expect, test } from 'vitest'
import { createLlamaIndexTools } from './llamaindex'
describe('llamaindex', () => {
test('createLlamaIndexTools', () => {
expect(createLlamaIndexTools(new EchoAITool())).toHaveLength(1)
})
})

Wyświetl plik

@ -1,8 +1,6 @@
import { type AIFunctionLike, AIFunctionSet } from '@agentic/core'
import { FunctionTool } from 'llamaindex'
import type { AIFunctionLike } from '../types'
import { AIFunctionSet } from '../ai-function-set'
/**
* Converts a set of Agentic stdlib AI functions to an array of LlamaIndex-
* compatible tools.

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@agentic/tsconfig/base.json",
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -0,0 +1 @@
export { default } from '../../tsup.config'

Wyświetl plik

@ -1,9 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, delay, getEnv, pruneNullOrUndefined } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { TimeoutError } from '../errors'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, delay, getEnv, pruneNullOrUndefined } from '../utils'
// TODO: add additional methods for upscaling, variations, etc.

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv } from '../utils'
export namespace novu {
export const API_BASE_URL = 'https://api.novu.co/v1'

Wyświetl plik

@ -1,8 +1,7 @@
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils'
/**
* TODO: I'm holding off on converting this client to an `AIFunctionsProvider`
* because it seems to be significantly more expensive than other data sources,

Wyświetl plik

@ -1,10 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, sanitizeSearchParams, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils'
// TODO: https://docs.goperigon.com/docs/searching-sources
// TODO: https://docs.goperigon.com/docs/journalist-data
// TODO: https://docs.goperigon.com/docs/topics

Wyświetl plik

@ -1,8 +1,6 @@
import { AIFunctionsProvider , assert, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { AIFunctionsProvider } from '../fns'
import { assert, getEnv } from '../utils'
// TODO: add aiFunction decorator to select methods
export namespace polygon {

Wyświetl plik

@ -1,16 +1,13 @@
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import type { DeepNullable } from '../types'
import { aiFunction, AIFunctionsProvider } from '../fns'
import {
import type { aiFunction, AIFunctionsProvider ,
assert,
getEnv,
DeepNullable , getEnv,
pruneUndefined,
sanitizeSearchParams,
throttleKy
} from '../utils'
} from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
// TODO: improve `domain` validation for fast-fail

Wyświetl plik

@ -1,11 +1,9 @@
import type { Simplify } from 'type-fest'
import { aiFunction, AIFunctionsProvider , assert, getEnv, sanitizeSearchParams, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils'
// All proxycurl types are auto-generated from their openapi spec
export namespace proxycurl {
// Allow up to 300 requests per minute by default (enforced at 5 minute intervals).

Wyświetl plik

@ -1,11 +1,10 @@
import { aiFunction, AIFunctionsProvider , omit, pick } from '@agentic/core'
import pMap from 'p-map'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { type diffbot, DiffbotClient } from '../services/diffbot-client'
import { SerpAPIClient } from '../services/serpapi-client'
import { isValidCrawlableUrl, normalizeUrl } from '../url-utils'
import { omit, pick } from '../utils'
// TODO: allow `search` tool to support other search clients
// (e.g. Bing, Exa, Searxng, Serper, Tavily)

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, omit, pick, pruneUndefined } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, omit, pick, pruneUndefined } from '../utils'
export namespace searxng {
export const SearchCategorySchema = z.enum([
'general',

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv } from '../utils'
/**
* All types have been exported from the `serpapi` package, which we're
* not using directly because it is bloated and has compatibility issues.

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, omit } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, omit } from '../utils'
export namespace serper {
export const API_BASE_URL = 'https://google.serper.dev'

Wyświetl plik

@ -1,9 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, delay, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { TimeoutError } from '../errors'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, delay, getEnv } from '../utils'
// TODO: need to expose more aiFunctions

Wyświetl plik

@ -1,9 +1,7 @@
import { AIFunctionsProvider , assert, getEnv, sanitizeSearchParams, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { AIFunctionsProvider } from '../fns'
import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils'
// TODO: need to add `aiFunction` wrappers for each method
export namespace socialdata {

Wyświetl plik

@ -1,10 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, pruneNullOrUndefined, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, pruneNullOrUndefined, throttleKy } from '../utils'
export namespace tavily {
export const API_BASE_URL = 'https://api.tavily.com'

Wyświetl plik

@ -1,9 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, delay, getEnv } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { TimeoutError } from '../errors'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, delay, getEnv } from '../utils'
export namespace twilio {
export const CONVERSATION_API_BASE_URL = 'https://conversations.twilio.com/v1'

Wyświetl plik

@ -0,0 +1 @@
export * from './wikidata-client'

Wyświetl plik

@ -1,11 +1,9 @@
import type * as wikibase from 'wikibase-sdk'
import { AIFunctionsProvider , assert, getEnv, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import wdk from 'wikibase-sdk/wikidata.org'
import { AIFunctionsProvider } from '../fns'
import { assert, getEnv, throttleKy } from '../utils'
export namespace wikidata {
// Allow up to 200 requests per second by default.
export const throttle = pThrottle({

Wyświetl plik

@ -1,10 +1,8 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, throttleKy } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import pThrottle from 'p-throttle'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, throttleKy } from '../utils'
export namespace wikipedia {
// Allow up to 200 requests per second by default.
export const throttle = pThrottle({

Wyświetl plik

@ -1,9 +1,7 @@
import { aiFunction, AIFunctionsProvider , assert, getEnv, sanitizeSearchParams } from '@agentic/core'
import defaultKy, { type KyInstance } from 'ky'
import { z } from 'zod'
import { aiFunction, AIFunctionsProvider } from '../fns'
import { assert, getEnv, sanitizeSearchParams } from '../utils'
export namespace wolframalpha {
export const API_BASE_URL = 'https://www.wolframalpha.com/api/'

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,8 +1,4 @@
packages:
- 'packages/tsconfig'
- 'packages/core'
- 'packages/weather'
- 'packages/ai-sdk'
- 'packages/*'
- 'examples/ai-sdk'
# - 'examples/*'
# - 'packages/*'