mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
Use Gemini without API key (#2805)
* google default auth and svc keyfile for Gemini * [.Net] Release note for 0.0.14 (#2815) * update release note * update trigger * [.Net] Update website for AutoGen.SemanticKernel and AutoGen.Ollama (#2814) support vertex ai compute region * [CAP] User supplied threads for agents (#2812) * First pass: message loop in main thread * pypi version bump * Fix readme * Better example * Fixed docs * pre-commit fixes * refactoring, minor fixes, update gemini demo ipynb * add new deps again and reset line endings * Docstring for the init function. Use private methods * improve docstring --------- Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com> Co-authored-by: Rajan <rajan.chari@yahoo.com> Co-authored-by: Zoltan Lux <z.lux@campus.tu-berlin.de>
This commit is contained in:
@@ -33,11 +33,18 @@ def gemini_client():
|
||||
return GeminiClient(api_key="fake_api_key")
|
||||
|
||||
|
||||
# Test initialization and configuration
|
||||
# Test compute location initialization and configuration
|
||||
@pytest.mark.skipif(skip, reason="Google GenAI dependency is not installed")
|
||||
def test_initialization():
|
||||
def test_compute_location_initialization():
|
||||
with pytest.raises(AssertionError):
|
||||
GeminiClient() # Should raise an AssertionError due to missing API key
|
||||
GeminiClient(
|
||||
api_key="fake_api_key", location="us-west1"
|
||||
) # Should raise an AssertionError due to specifying API key and compute location
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def gemini_google_auth_default_client():
|
||||
return GeminiClient()
|
||||
|
||||
|
||||
@pytest.mark.skipif(skip, reason="Google GenAI dependency is not installed")
|
||||
|
||||
Reference in New Issue
Block a user