-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
688bc0b
commit b8b4f69
Showing
6 changed files
with
648 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Palm2AiEndpoint } from "../../lib/src/lib/endpoints/Palm2AiEndpoint"; | ||
|
||
describe('Palm2AiEndpoint', () => { | ||
test('should return the expected response for a given prompt', async () => { | ||
const apiKey = 'AIzaSyB2Cc5yX0q5HCOgMWtdsh5mALBorAiLlxE'; | ||
const model = 'models/text-bison-001'; | ||
const temperature = 0.7; | ||
|
||
const palm2AiEndpoint = new Palm2AiEndpoint(apiKey, model, temperature); | ||
|
||
// const response = await palm2AiEndpoint.chatFun(promptText) | ||
expect(await palm2AiEndpoint.chatFun("how many states in Inida")).toBe('28'); | ||
}); | ||
}); | ||
describe('Palm2AiEndpoint', () => { | ||
test('should return the expected response for a given prompt', async () => { | ||
const apiKey = 'AIzaSyB2Cc5yX0q5HCOgMWtdsh5mALBorAiLlxE'; | ||
const model = 'models/text-bison-001'; | ||
const temperature = 0.7; | ||
|
||
const palm2AiEndpoint = new Palm2AiEndpoint(apiKey, model, temperature); | ||
|
||
// const response = await palm2AiEndpoint.chatFun(promptText) | ||
expect(await palm2AiEndpoint.chatFun("Pm of india")).toBe('NarendraModi'); | ||
}); | ||
}); | ||
|
||
describe('Palm2AiEndpoint', () => { | ||
test('should return the expected response for a given prompt', async () => { | ||
const apiKey = 'AIzaSyB2Cc5yX0q5HCOgMWtdsh5mALBorAiLlxE'; | ||
const model = 'models/text-bison-001'; | ||
const temperature = 0.7; | ||
|
||
const palm2AiEndpoint = new Palm2AiEndpoint(apiKey, model, temperature); | ||
|
||
// const response = await palm2AiEndpoint.chatFun(promptText) | ||
expect(await palm2AiEndpoint.chatFun("smallest 2 digit value")).toBe('10'); | ||
}); | ||
}); |
Oops, something went wrong.