-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AI-130): displaying previous thread messages (#23)
- Loading branch information
1 parent
18cb2e1
commit 374032c
Showing
14 changed files
with
131 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/spa/src/app/components/chat/chat-audio/chat-audio.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { AgentService } from './agent.service'; | ||
import { AssistantCreateParams } from 'openai/resources/beta'; | ||
|
||
describe('AgentService', () => { | ||
let agentService: AgentService; | ||
const agentNameMock = 'agent-name'; | ||
const agentMock = async () => 'agent-result'; | ||
const definitionMock: AssistantCreateParams.AssistantToolsFunction = { | ||
type: 'function', | ||
function: { name: agentNameMock }, | ||
}; | ||
|
||
beforeEach(() => { | ||
agentService = new AgentService(); | ||
}); | ||
|
||
describe('add', () => { | ||
it('should add new tool', async () => { | ||
agentService.add(definitionMock, agentMock); | ||
expect(agentService.tools).toContain(definitionMock); | ||
}); | ||
|
||
it('should add new agent', async () => { | ||
agentService.add(definitionMock, agentMock); | ||
expect(agentService.agents[agentNameMock]).toEqual(agentMock); | ||
}); | ||
}); | ||
|
||
describe('get', () => { | ||
it('should return agent', async () => { | ||
agentService.add(definitionMock, agentMock); | ||
expect(agentService.get(agentNameMock)).toEqual(agentMock); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters