Skip to content

Commit b882822

Browse files
Jinash RouniyarJinash Rouniyar
authored andcommitted
Fixed baseURL issue
1 parent 7cfb7ba commit b882822

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/collections/config/types/reranker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export type RerankerNvidiaConfig = {
2525
};
2626

2727
export type RerankerContextualAIConfig = {
28-
baseURL?: string;
2928
model?:
3029
| 'ctxl-rerank-v2-instruct-multilingual'
3130
| 'ctxl-rerank-v2-instruct-multilingual-mini'

src/collections/configure/unit.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,8 @@ describe('Unit testing of the generative factory class', () => {
19491949
maxTokens: 100,
19501950
temperature: 0.7,
19511951
topP: 0.9,
1952-
systemPrompt: 'system',
1952+
systemPrompt:
1953+
'You are a helpful assistant that provides accurate and informative responses based on the given context.',
19531954
avoidCommentary: false,
19541955
});
19551956
expect(config).toEqual<ModuleConfig<'generative-contextualai', GenerativeContextualAIConfig>>({
@@ -1959,7 +1960,8 @@ describe('Unit testing of the generative factory class', () => {
19591960
maxTokensProperty: 100,
19601961
temperatureProperty: 0.7,
19611962
topPProperty: 0.9,
1962-
systemPromptProperty: 'system',
1963+
systemPromptProperty:
1964+
'You are a helpful assistant that provides accurate and informative responses based on the given context.',
19631965
avoidCommentaryProperty: false,
19641966
},
19651967
});
@@ -2309,15 +2311,13 @@ describe('Unit testing of the reranker factory class', () => {
23092311

23102312
it('should create the correct RerankerContextualAIConfig type with all values', () => {
23112313
const config = configure.reranker.contextualai({
2312-
baseURL: 'https://api.contextual.ai',
23132314
model: 'ctxl-rerank-v2-instruct-multilingual',
23142315
instruction: 'Custom reranking instruction',
23152316
topN: 10,
23162317
});
23172318
expect(config).toEqual<ModuleConfig<'reranker-contextualai', RerankerContextualAIConfig | undefined>>({
23182319
name: 'reranker-contextualai',
23192320
config: {
2320-
baseURL: 'https://api.contextual.ai',
23212321
model: 'ctxl-rerank-v2-instruct-multilingual',
23222322
instruction: 'Custom reranking instruction',
23232323
topN: 10,

src/collections/generate/unit.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ describe('Unit testing of the generativeParameters factory methods', () => {
315315
it('with defaults', () => {
316316
const config = generativeParameters.contextualai();
317317
expect(config).toEqual<
318-
ModuleConfig<'generative-contextualai', GenerativeConfigRuntimeType<'generative-contextualai'> | undefined>
318+
ModuleConfig<
319+
'generative-contextualai',
320+
GenerativeConfigRuntimeType<'generative-contextualai'> | undefined
321+
>
319322
>({
320323
name: 'generative-contextualai',
321324
config: undefined,
@@ -331,7 +334,10 @@ describe('Unit testing of the generativeParameters factory methods', () => {
331334
avoidCommentary: false,
332335
});
333336
expect(config).toEqual<
334-
ModuleConfig<'generative-contextualai', GenerativeConfigRuntimeType<'generative-contextualai'> | undefined>
337+
ModuleConfig<
338+
'generative-contextualai',
339+
GenerativeConfigRuntimeType<'generative-contextualai'> | undefined
340+
>
335341
>({
336342
name: 'generative-contextualai',
337343
config: {

0 commit comments

Comments
 (0)