mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
Refactor: Use config.getGeminiClient() for GeminiClient instantiation (#715)
This commit is contained in:
parent
cf84f1af68
commit
8ab74ef1bb
9 changed files with 39 additions and 16 deletions
|
|
@ -145,7 +145,7 @@ export const useGeminiStream = (
|
|||
setInitError(null);
|
||||
if (!geminiClientRef.current) {
|
||||
try {
|
||||
geminiClientRef.current = new GeminiClient(config);
|
||||
geminiClientRef.current = config.getGeminiClient();
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = `Failed to initialize client: ${getErrorMessage(error) || 'Unknown error'}`;
|
||||
setInitError(errorMsg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue