mirror of https://github.com/ollama/ollama.git
				
				
				
			trim all params
This commit is contained in:
		
							parent
							
								
									4e986a823c
								
							
						
					
					
						commit
						9bd00041fa
					
				|  | @ -124,8 +124,7 @@ func ParseFile(r io.Reader) (*File, error) { | |||
| 			case stateComment, stateNil: | ||||
| 				// pass
 | ||||
| 			case stateValue: | ||||
| 				s, ok := unquote(b.String()) | ||||
| 
 | ||||
| 				s, ok := unquote(strings.TrimSpace(b.String())) | ||||
| 				if !ok || isSpace(r) { | ||||
| 					if _, err := b.WriteRune(r); err != nil { | ||||
| 						return nil, err | ||||
|  | @ -159,13 +158,7 @@ func ParseFile(r io.Reader) (*File, error) { | |||
| 	case stateComment, stateNil: | ||||
| 		// pass; nothing to flush
 | ||||
| 	case stateValue: | ||||
| 		var s string | ||||
| 		var ok bool | ||||
| 		if cmd.Name == "model" { | ||||
| 			s, ok = unquote(strings.TrimSpace(b.String())) | ||||
| 		} else { | ||||
| 			s, ok = unquote(b.String()) | ||||
| 		} | ||||
| 		s, ok := unquote(strings.TrimSpace(b.String())) | ||||
| 		if !ok { | ||||
| 			return nil, io.ErrUnexpectedEOF | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue