mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
fix passthru tests
This commit is contained in:
parent
801044e8be
commit
5d7694293f
6 changed files with 12 additions and 12 deletions
|
|
@ -29,7 +29,7 @@ describe('Gemini AI Tests', () => {
|
|||
};
|
||||
|
||||
const model = genAI.getGenerativeModel({
|
||||
model: 'gemini-1.5-pro'
|
||||
model: 'gemini-2.5-flash-lite'
|
||||
}, requestOptions);
|
||||
|
||||
const prompt = 'Say "hello test" and nothing else';
|
||||
|
|
@ -77,7 +77,7 @@ describe('Gemini AI Tests', () => {
|
|||
};
|
||||
|
||||
const model = genAI.getGenerativeModel({
|
||||
model: 'gemini-1.5-pro'
|
||||
model: 'gemini-2.5-flash-lite'
|
||||
}, requestOptions);
|
||||
|
||||
const prompt = 'Say "hello test" and nothing else';
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
const { GoogleGenerativeAI, ModelParams, RequestOptions } = require("@google/generative-ai");
|
||||
|
||||
const modelParams = {
|
||||
model: 'gemini-1.5-pro',
|
||||
model: 'gemini-2.5-flash-lite',
|
||||
};
|
||||
|
||||
const requestOptions = {
|
||||
baseUrl: 'http://127.0.0.1:4000/gemini',
|
||||
customHeaders: {
|
||||
"tags": "gemini-js-sdk,gemini-1.5-pro"
|
||||
"tags": "gemini-js-sdk,gemini-2.5-flash-lite"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const requestOptions = {
|
|||
};
|
||||
|
||||
const generativeModel = vertexAI.getGenerativeModel(
|
||||
{ model: 'gemini-1.5-pro' },
|
||||
{ model: 'gemini-2.5-flash-lite' },
|
||||
requestOptions
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ describe('Vertex AI Tests', () => {
|
|||
};
|
||||
|
||||
const generativeModel = vertexAI.getGenerativeModel(
|
||||
{ model: 'gemini-1.5-pro' },
|
||||
{ model: 'gemini-2.5-flash-lite' },
|
||||
requestOptions
|
||||
);
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ describe('Vertex AI Tests', () => {
|
|||
const vertexAI = new VertexAI({project: 'pathrise-convert-1606954137718', location: 'us-central1', apiEndpoint: "localhost:4000/vertex-ai"});
|
||||
const customHeaders = new Headers({"x-litellm-api-key": "sk-1234"});
|
||||
const requestOptions = {customHeaders: customHeaders};
|
||||
const generativeModel = vertexAI.getGenerativeModel({model: 'gemini-1.5-pro'}, requestOptions);
|
||||
const generativeModel = vertexAI.getGenerativeModel({model: 'gemini-2.5-flash-lite'}, requestOptions);
|
||||
const request = {contents: [{role: 'user', parts: [{text: 'What is 2+2?'}]}]};
|
||||
|
||||
const result = await generativeModel.generateContent(request);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ async def test_basic_vertex_ai_pass_through_with_spendlog():
|
|||
api_transport="rest",
|
||||
)
|
||||
|
||||
model = GenerativeModel(model_name="gemini-1.5-pro")
|
||||
model = GenerativeModel(model_name="gemini-2.5-flash-lite")
|
||||
response = model.generate_content("hi")
|
||||
|
||||
print("response", response)
|
||||
|
|
@ -136,7 +136,7 @@ async def test_basic_vertex_ai_pass_through_streaming_with_spendlog():
|
|||
api_transport="rest",
|
||||
)
|
||||
|
||||
model = GenerativeModel(model_name="gemini-1.5-pro")
|
||||
model = GenerativeModel(model_name="gemini-2.5-flash-lite")
|
||||
response = model.generate_content("hi", stream=True)
|
||||
|
||||
for chunk in response:
|
||||
|
|
@ -192,7 +192,7 @@ async def test_vertex_ai_pass_through_endpoint_context_caching():
|
|||
]
|
||||
|
||||
cached_content = caching.CachedContent.create(
|
||||
model_name="gemini-1.5-pro-001",
|
||||
model_name="gemini-2.5-flash-lite-001",
|
||||
system_instruction=system_instruction,
|
||||
contents=contents,
|
||||
ttl=datetime.timedelta(minutes=60),
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ describe('Vertex AI Tests', () => {
|
|||
};
|
||||
|
||||
const generativeModel = vertexAI.getGenerativeModel(
|
||||
{ model: 'gemini-1.5-pro' },
|
||||
{ model: 'gemini-2.5-flash-lite' },
|
||||
requestOptions
|
||||
);
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ describe('Vertex AI Tests', () => {
|
|||
};
|
||||
|
||||
const generativeModel = vertexAI.getGenerativeModel(
|
||||
{ model: 'gemini-1.5-pro' },
|
||||
{ model: 'gemini-2.5-flash-lite' },
|
||||
requestOptions
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue