|
1 | 1 | import { expect } from 'chai' |
2 | 2 | import AiAssistant from '../../lib/ai.js' |
3 | 3 | import config from '../../lib/config.js' |
4 | | -import { openai } from '@ai-sdk/openai' |
5 | 4 | import { createMockModel, MockResponses } from '../support/mock-ai-provider.js' |
6 | 5 | import fs from 'fs' |
7 | 6 | import path from 'path' |
@@ -44,31 +43,6 @@ describe('AI module', () => { |
44 | 43 | expect(AiAssistant.isEnabled).to.be.false |
45 | 44 | }) |
46 | 45 |
|
47 | | - it.skip('Creating completion', async () => { |
48 | | - AiAssistant.enable({ |
49 | | - model: openai('gpt-4o-mini'), |
50 | | - }) |
51 | | - const completion = await AiAssistant.createCompletion([ |
52 | | - { role: 'user', content: 'message 1' }, |
53 | | - { role: 'user', content: 'message 2' }, |
54 | | - ]) |
55 | | - expect(completion).to.be.a('string') |
56 | | - }) |
57 | | - |
58 | | - it.skip('Healing failed step', async () => { |
59 | | - AiAssistant.enable({ |
60 | | - model: openai('gpt-4o-mini'), |
61 | | - }) |
62 | | - const failureContext = { |
63 | | - html: '<div><a href="#">Hello, world!</a></div>', |
64 | | - step: { toCode: () => 'Failed step' }, |
65 | | - error: { message: 'Error message' }, |
66 | | - prevSteps: [{ toString: () => 'Previous step' }], |
67 | | - } |
68 | | - const completion = await AiAssistant.healFailedStep(failureContext) |
69 | | - expect(completion).to.be.an('array') |
70 | | - }) |
71 | | - |
72 | 46 | it('Stopping when reaching tokens limit', async () => { |
73 | 47 | await AiAssistant.enable({ maxTokens: 100 }) |
74 | 48 | AiAssistant.numTokens = 200 |
|
0 commit comments