kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: add timeouts for live ts sdk provider tests
rodzic
aa76307f8a
commit
a9836ff7ce
|
@ -7,8 +7,14 @@ test('createAISDKTools', () => {
|
|||
expect(createAISDKTools(new EchoAITool())).toHaveProperty('echo')
|
||||
})
|
||||
|
||||
test('createAISDKToolsFromIdentifier', async () => {
|
||||
await expect(
|
||||
createAISDKToolsFromIdentifier('@agentic/search')
|
||||
).resolves.toHaveProperty('search')
|
||||
})
|
||||
test(
|
||||
'createAISDKToolsFromIdentifier',
|
||||
{
|
||||
timeout: 30_000
|
||||
},
|
||||
async () => {
|
||||
await expect(
|
||||
createAISDKToolsFromIdentifier('@agentic/search')
|
||||
).resolves.toHaveProperty('search')
|
||||
}
|
||||
)
|
||||
|
|
|
@ -9,9 +9,18 @@ test('createGenkitTools', () => {
|
|||
expect(createGenkitTools(genkit, new EchoAITool())).toHaveLength(1)
|
||||
})
|
||||
|
||||
test('createGenkitToolsFromIdentifier', async () => {
|
||||
const genkit = new Genkit()
|
||||
const tools = await createGenkitToolsFromIdentifier(genkit, '@agentic/search')
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.__action.name).toBe('search')
|
||||
})
|
||||
test(
|
||||
'createGenkitToolsFromIdentifier',
|
||||
{
|
||||
timeout: 30_000
|
||||
},
|
||||
async () => {
|
||||
const genkit = new Genkit()
|
||||
const tools = await createGenkitToolsFromIdentifier(
|
||||
genkit,
|
||||
'@agentic/search'
|
||||
)
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.__action.name).toBe('search')
|
||||
}
|
||||
)
|
||||
|
|
|
@ -10,8 +10,14 @@ test('createLangChainTools', () => {
|
|||
expect(createLangChainTools(new EchoAITool())).toHaveLength(1)
|
||||
})
|
||||
|
||||
test('createLangChainToolsFromIdentifier', async () => {
|
||||
const tools = await createLangChainToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.name).toBe('search')
|
||||
})
|
||||
test(
|
||||
'createLangChainToolsFromIdentifier',
|
||||
{
|
||||
timeout: 30_000
|
||||
},
|
||||
async () => {
|
||||
const tools = await createLangChainToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.name).toBe('search')
|
||||
}
|
||||
)
|
||||
|
|
|
@ -10,8 +10,14 @@ test('createLlamaIndexTools', () => {
|
|||
expect(createLlamaIndexTools(new EchoAITool())).toHaveLength(1)
|
||||
})
|
||||
|
||||
test('createLlamaIndexToolsFromIdentifier', async () => {
|
||||
const tools = await createLlamaIndexToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.metadata.name).toBe('search')
|
||||
})
|
||||
test(
|
||||
'createLlamaIndexToolsFromIdentifier',
|
||||
{
|
||||
timeout: 30_000
|
||||
},
|
||||
async () => {
|
||||
const tools = await createLlamaIndexToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveLength(1)
|
||||
expect(tools[0]!.metadata.name).toBe('search')
|
||||
}
|
||||
)
|
||||
|
|
|
@ -7,7 +7,13 @@ test('createMastraTools', () => {
|
|||
expect(createMastraTools(new EchoAITool())).toHaveProperty('echo')
|
||||
})
|
||||
|
||||
test('createMastraToolsFromIdentifier', async () => {
|
||||
const tools = await createMastraToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveProperty('search')
|
||||
})
|
||||
test(
|
||||
'createMastraToolsFromIdentifier',
|
||||
{
|
||||
timeout: 30_000
|
||||
},
|
||||
async () => {
|
||||
const tools = await createMastraToolsFromIdentifier('@agentic/search')
|
||||
expect(tools).toHaveProperty('search')
|
||||
}
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue