更gemini.py空格刪除
Browse files- gemini_simple.py +1 -1
    	
        gemini_simple.py
    CHANGED
    
    | @@ -14,7 +14,7 @@ client = genai.Client(api_key=api_key) | |
| 14 | 
             
            chat = client.chats.create(model="gemini-2.0-flash")
         | 
| 15 | 
             
            system_prompt = "You are a helpful assistant and always respond in Traditional Chinese."
         | 
| 16 |  | 
| 17 | 
            -
            # 回應函數(符合 type="messages" | 
| 18 | 
             
            def respond(message,history):
         | 
| 19 | 
             
                response = chat.send_message(f"{system_prompt}:{message}")
         | 
| 20 | 
             
                return response.text
         | 
|  | |
| 14 | 
             
            chat = client.chats.create(model="gemini-2.0-flash")
         | 
| 15 | 
             
            system_prompt = "You are a helpful assistant and always respond in Traditional Chinese."
         | 
| 16 |  | 
| 17 | 
            +
            # 回應函數(符合 type="messages"的格式)
         | 
| 18 | 
             
            def respond(message,history):
         | 
| 19 | 
             
                response = chat.send_message(f"{system_prompt}:{message}")
         | 
| 20 | 
             
                return response.text
         |