mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Small genai fix (#14850)
* Ensure the regenerate button shows when genai is only enabled at the camera level * update docs
This commit is contained in:
		
							parent
							
								
									15bd26c9b1
								
							
						
					
					
						commit
						0d59754be2
					
				| @ -3,9 +3,13 @@ id: genai | ||||
| title: Generative AI | ||||
| --- | ||||
| 
 | ||||
| Generative AI can be used to automatically generate descriptive text based on the thumbnails of your tracked objects. This helps with [Semantic Search](/configuration/semantic_search) in Frigate to provide more context about your tracked objects. | ||||
| Generative AI can be used to automatically generate descriptive text based on the thumbnails of your tracked objects. This helps with [Semantic Search](/configuration/semantic_search) in Frigate to provide more context about your tracked objects. Descriptions are accessed via the _Explore_ view in the Frigate UI by clicking on a tracked object's thumbnail. | ||||
| 
 | ||||
| Semantic Search must be enabled to use Generative AI. Descriptions are accessed via the _Explore_ view in the Frigate UI by clicking on a tracked object's thumbnail. | ||||
| :::info | ||||
| 
 | ||||
| Semantic Search must be enabled to use Generative AI. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| ## Configuration | ||||
| 
 | ||||
|  | ||||
| @ -996,9 +996,11 @@ def regenerate_description( | ||||
|             status_code=404, | ||||
|         ) | ||||
| 
 | ||||
|     camera_config = request.app.frigate_config.cameras[event.camera] | ||||
| 
 | ||||
|     if ( | ||||
|         request.app.frigate_config.semantic_search.enabled | ||||
|         and request.app.frigate_config.genai.enabled | ||||
|         and camera_config.genai.enabled | ||||
|     ): | ||||
|         request.app.event_metadata_updater.publish((event.id, params.source)) | ||||
| 
 | ||||
|  | ||||
| @ -54,11 +54,10 @@ class GenAIClient: | ||||
| 
 | ||||
| def get_genai_client(genai_config: GenAIConfig) -> Optional[GenAIClient]: | ||||
|     """Get the GenAI client.""" | ||||
|     if genai_config.enabled: | ||||
|         load_providers() | ||||
|         provider = PROVIDERS.get(genai_config.provider) | ||||
|         if provider: | ||||
|             return provider(genai_config) | ||||
|     load_providers() | ||||
|     provider = PROVIDERS.get(genai_config.provider) | ||||
|     if provider: | ||||
|         return provider(genai_config) | ||||
|     return None | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -477,7 +477,7 @@ function ObjectDetailsTab({ | ||||
|           onChange={(e) => setDesc(e.target.value)} | ||||
|         /> | ||||
|         <div className="flex w-full flex-row justify-end gap-2"> | ||||
|           {config?.genai.enabled && ( | ||||
|           {config?.cameras[search.camera].genai.enabled && ( | ||||
|             <div className="flex items-center"> | ||||
|               <Button | ||||
|                 className="rounded-r-none border-r-0" | ||||
|  | ||||
| @ -77,6 +77,13 @@ export interface CameraConfig { | ||||
|     cmd: string; | ||||
|     roles: string[]; | ||||
|   }[]; | ||||
|   genai: { | ||||
|     enabled: string; | ||||
|     prompt: string; | ||||
|     object_prompts: { [key: string]: string }; | ||||
|     required_zones: string[]; | ||||
|     objects: string[]; | ||||
|   }; | ||||
|   live: { | ||||
|     height: number; | ||||
|     quality: number; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user