We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23a8348 commit 88528eeCopy full SHA for 88528ee
1 file changed
MyApp.ServiceInterface/AgentServices.cs
@@ -804,7 +804,10 @@ public object Get(GetOllamaGenerateTask request)
804
var image = ollama.Images[i];
805
if (image.StartsWith('/') || image.StartsWith("../"))
806
{
807
- var imageBytes = File.ReadAllBytes(appData.ContentRootPath.CombineWith(image));
+ var usePath = image.StartsWith('/')
808
+ ? image
809
+ : appData.ContentRootPath.CombineWith(image);
810
+ var imageBytes = File.ReadAllBytes(usePath);
811
var base64 = Convert.ToBase64String(imageBytes);
812
ollama.Images[i] = base64;
813
}
0 commit comments