forked from open-webui/open-webui
		
	Merge pull request #1632 from cheahjs/fix/error-object-object
fix: use model name when outputting error message
This commit is contained in:
		
						commit
						f04164378a
					
				
					 2 changed files with 10 additions and 6 deletions
				
			
		|  | @ -681,16 +681,18 @@ | ||||||
| 				} | 				} | ||||||
| 			} else { | 			} else { | ||||||
| 				toast.error( | 				toast.error( | ||||||
| 					$i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { provider: model }) | 					$i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
|  | 						provider: model.name ?? model.id | ||||||
|  | 					}) | ||||||
| 				); | 				); | ||||||
| 				responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | 				responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
| 					provider: model | 					provider: model.name ?? model.id | ||||||
| 				}); | 				}); | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			responseMessage.error = true; | 			responseMessage.error = true; | ||||||
| 			responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | 			responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
| 				provider: model | 				provider: model.name ?? model.id | ||||||
| 			}); | 			}); | ||||||
| 			responseMessage.done = true; | 			responseMessage.done = true; | ||||||
| 			messages = messages; | 			messages = messages; | ||||||
|  |  | ||||||
|  | @ -693,16 +693,18 @@ | ||||||
| 				} | 				} | ||||||
| 			} else { | 			} else { | ||||||
| 				toast.error( | 				toast.error( | ||||||
| 					$i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { provider: model }) | 					$i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
|  | 						provider: model.name ?? model.id | ||||||
|  | 					}) | ||||||
| 				); | 				); | ||||||
| 				responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | 				responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
| 					provider: model | 					provider: model.name ?? model.id | ||||||
| 				}); | 				}); | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			responseMessage.error = true; | 			responseMessage.error = true; | ||||||
| 			responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | 			responseMessage.content = $i18n.t(`Uh-oh! There was an issue connecting to {{provider}}.`, { | ||||||
| 				provider: model | 				provider: model.name ?? model.id | ||||||
| 			}); | 			}); | ||||||
| 			responseMessage.done = true; | 			responseMessage.done = true; | ||||||
| 			messages = messages; | 			messages = messages; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Jaeryang Baek
						Timothy Jaeryang Baek