forked from open-webui/open-webui
		
	Settings were being referenced incorrectly and as a result, no settings were being sent to openai endpoint. Added num_predict slider in advanced UI. Also added seed, stop and max_tokens (uses num_predict) being sent to openai endpoint.
This commit is contained in:
		
							parent
							
								
									87f5e72eeb
								
							
						
					
					
						commit
						431b710e46
					
				
					 5 changed files with 69 additions and 12 deletions
				
			
		|  | @ -368,10 +368,13 @@ | |||
| 										  } | ||||
| 										: { content: message.content }) | ||||
| 								})), | ||||
| 							temperature: $settings.temperature ?? undefined, | ||||
| 							top_p: $settings.top_p ?? undefined, | ||||
| 							num_ctx: $settings.num_ctx ?? undefined, | ||||
| 							frequency_penalty: $settings.repeat_penalty ?? undefined | ||||
| 							seed: $settings.options.seed ?? undefined, | ||||
| 							stop: $settings.options.stop ?? undefined, | ||||
| 							temperature: $settings.options.temperature ?? undefined, | ||||
| 							top_p: $settings.options.top_p ?? undefined, | ||||
| 							num_ctx: $settings.options.num_ctx ?? undefined, | ||||
| 							frequency_penalty: $settings.options.repeat_penalty ?? undefined, | ||||
| 							max_tokens: $settings.options.num_predict ?? undefined, | ||||
| 						}) | ||||
| 					} | ||||
| 				).catch((err) => { | ||||
|  |  | |||
|  | @ -395,10 +395,13 @@ | |||
| 										  } | ||||
| 										: { content: message.content }) | ||||
| 								})), | ||||
| 							temperature: $settings.temperature ?? undefined, | ||||
| 							top_p: $settings.top_p ?? undefined, | ||||
| 							num_ctx: $settings.num_ctx ?? undefined, | ||||
| 							frequency_penalty: $settings.repeat_penalty ?? undefined | ||||
| 							seed: $settings.options.seed ?? undefined, | ||||
| 							stop: $settings.options.stop ?? undefined, | ||||
| 							temperature: $settings.options.temperature ?? undefined, | ||||
| 							top_p: $settings.options.top_p ?? undefined, | ||||
| 							num_ctx: $settings.options.num_ctx ?? undefined, | ||||
| 							frequency_penalty: $settings.options.repeat_penalty ?? undefined, | ||||
| 							max_tokens: $settings.options.num_predict ?? undefined, | ||||
| 						}) | ||||
| 					} | ||||
| 				).catch((err) => { | ||||
|  |  | |||
|  | @ -51,7 +51,8 @@ | |||
| 		top_k: '', | ||||
| 		top_p: '', | ||||
| 		tfs_z: '', | ||||
| 		num_ctx: '' | ||||
| 		num_ctx: '', | ||||
| 		num_predict: '' | ||||
| 	}; | ||||
| 
 | ||||
| 	let modelfileCreator = null; | ||||
|  | @ -73,6 +74,7 @@ ${options.top_k !== '' ? `PARAMETER top_k ${options.top_k}` : ''} | |||
| ${options.top_p !== '' ? `PARAMETER top_p ${options.top_p}` : ''} | ||||
| ${options.tfs_z !== '' ? `PARAMETER tfs_z ${options.tfs_z}` : ''} | ||||
| ${options.num_ctx !== '' ? `PARAMETER num_ctx ${options.num_ctx}` : ''} | ||||
| ${options.num_predict !== '' ? `PARAMETER num_predict ${options.num_predict}` : ''} | ||||
| SYSTEM """${system}"""`.replace(/^\s*\n/gm, ''); | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 David Young
						David Young