forked from open-webui/open-webui
		
	feat: text completion playground
This commit is contained in:
		
							parent
							
								
									9b86e0bb41
								
							
						
					
					
						commit
						2379e94cbf
					
				
					 5 changed files with 336 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -79,14 +79,18 @@
 | 
			
		|||
								throw data;
 | 
			
		||||
							}
 | 
			
		||||
 | 
			
		||||
							if (data.done == false) {
 | 
			
		||||
								if (prompt == '' && data.response == '\n') {
 | 
			
		||||
									continue;
 | 
			
		||||
								} else {
 | 
			
		||||
									prompt += data.response;
 | 
			
		||||
									console.log(data.response);
 | 
			
		||||
									chatInputElement.scrollTop = chatInputElement.scrollHeight;
 | 
			
		||||
									await tick();
 | 
			
		||||
							if ('id' in data) {
 | 
			
		||||
								console.log(data);
 | 
			
		||||
							} else {
 | 
			
		||||
								if (data.done == false) {
 | 
			
		||||
									if (prompt == '' && data.response == '\n') {
 | 
			
		||||
										continue;
 | 
			
		||||
									} else {
 | 
			
		||||
										prompt += data.response;
 | 
			
		||||
										console.log(data.response);
 | 
			
		||||
										chatInputElement.scrollTop = chatInputElement.scrollHeight;
 | 
			
		||||
										await tick();
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue