mirror of
				https://github.com/open-webui/open-webui
				synced 2025-06-26 18:26:48 +00:00 
			
		
		
		
	refac
This commit is contained in:
		
							parent
							
								
									b1d83fc42c
								
							
						
					
					
						commit
						493fe562ac
					
				@ -24,10 +24,16 @@ def prompt_template(
 | 
			
		||||
    if user_name:
 | 
			
		||||
        # Replace {{USER_NAME}} in the template with the user's name
 | 
			
		||||
        template = template.replace("{{USER_NAME}}", user_name)
 | 
			
		||||
    else:
 | 
			
		||||
        # Replace {{USER_NAME}} in the template with "Unknown"
 | 
			
		||||
        template = template.replace("{{USER_NAME}}", "Unknown")
 | 
			
		||||
 | 
			
		||||
    if user_location:
 | 
			
		||||
        # Replace {{USER_LOCATION}} in the template with the current location
 | 
			
		||||
        template = template.replace("{{USER_LOCATION}}", user_location)
 | 
			
		||||
    else:
 | 
			
		||||
        # Replace {{USER_LOCATION}} in the template with "Unknown"
 | 
			
		||||
        template = template.replace("{{USER_LOCATION}}", "Unknown")
 | 
			
		||||
 | 
			
		||||
    return template
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -33,9 +33,9 @@
 | 
			
		||||
 | 
			
		||||
	<div class="flex flex-col">
 | 
			
		||||
		{#if tools.length > 0}
 | 
			
		||||
			<div class=" flex items-center gap-2 mt-2">
 | 
			
		||||
			<div class=" flex items-center mt-2 flex-wrap">
 | 
			
		||||
				{#each Object.keys(_tools) as tool, toolIdx}
 | 
			
		||||
					<div class=" flex items-center gap-2">
 | 
			
		||||
					<div class=" flex items-center gap-2 mr-3">
 | 
			
		||||
						<div class="self-center flex items-center">
 | 
			
		||||
							<Checkbox
 | 
			
		||||
								state={_tools[tool].selected ? 'checked' : 'unchecked'}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user