Skip to content

Commit 48adff7

Browse files
author
Piotr Stachaczynski
committed
feat: fix and release notes
1 parent f581962 commit 48adff7

4 files changed

Lines changed: 91 additions & 65 deletions

File tree

Releases/0.0.8-pre.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 0.0.8 pre-release
2+
3+
- Project cleanup
4+
- New version of CLI (introduced infer and config commands)
5+
- name of model **breaking change**
6+
7+
In order to align with new breaking change, align your already downloaded models to this names (and ofc .gguf extension)
8+
-- DeepSeekR1-8b
9+
-- Fox-1.6b
10+
-- gemma2-2b
11+
-- Llama3.1-8b
12+
-- Llama3.2-3b
13+
-- Llava
14+
-- Nomic
15+
-- phi3.5
16+
-- Qwen2.5

src/MaIN.Core/.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>MaIN.NET</id>
5-
<version>0.0.7-pre</version>
5+
<version>0.0.8-pre</version>
66
<authors>Wisedev</authors>
77
<owners>Wisedev</owners>
88
<icon>favicon.png</icon>

src/MaIN.Core/Hub/Contexts/ChatContext.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace MaIN.Core.Hub.Contexts;
99
public class ChatContext
1010
{
1111
private readonly IChatService _chatService;
12-
private Chat? _chat;
12+
private Chat _chat { get; set; }
1313

1414
internal ChatContext(IChatService chatService)
1515
{
@@ -22,7 +22,7 @@ internal ChatContext(IChatService chatService)
2222
};
2323
}
2424

25-
internal ChatContext(IChatService chatService, Chat? existingChat)
25+
internal ChatContext(IChatService chatService, Chat existingChat)
2626
{
2727
_chatService = chatService;
2828
_chat = existingChat;
@@ -114,7 +114,7 @@ public async Task<ChatResult> CompleteAsync(
114114
bool interactive = false,
115115
Func<string?, Task>? changeOfValue = null)
116116
{
117-
if (_chat.Id == null || !await ChatExists(_chat.Id))
117+
if (!await ChatExists(_chat.Id))
118118
{
119119
await _chatService.Create(_chat);
120120
}
@@ -160,6 +160,10 @@ private async Task<bool> ChatExists(string id)
160160
public async Task<ChatContext> FromExisting(string chatId)
161161
{
162162
var existingChat = await _chatService.GetById(chatId);
163+
if (existingChat == null)
164+
{
165+
throw new Exception("Chat not found");
166+
}
163167
return new ChatContext(_chatService, existingChat);
164168
}
165169

src/MaIN.Domain/Models/SupportedModels.cs

Lines changed: 67 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,74 @@ public class Model
99
public string? Path { get; set; }
1010
}
1111

12-
public struct KnownModels
12+
public static class KnownModels
1313
{
14-
internal static List<Model> Models => new()
15-
{
16-
17-
new Model()
18-
{
19-
Description = string.Empty,
20-
Name = KnownModelNames.Gemma2_2b,
21-
FileName = "gemma2-2b.gguf",
22-
DownloadUrl = "https://huggingface.co/TheBloke/gemma2-2b-quantized/resolve/main/gemma2-2b-quantized.bin",
23-
},
24-
new Model()
25-
{
26-
Description = string.Empty,
27-
Name = KnownModelNames.Llama3_2_3b,
28-
FileName = "Llama3.2-3b.gguf",
29-
DownloadUrl = string.Empty
30-
},
31-
new Model()
32-
{
33-
Description = string.Empty,
34-
Name = KnownModelNames.Llama3_1_8b,
35-
FileName = "Llama3.1-8b.gguf",
36-
DownloadUrl = string.Empty
37-
},
38-
new Model()
39-
{
40-
Description = string.Empty,
41-
Name = KnownModelNames.Llava_7b,
42-
FileName = "Llava.gguf",
43-
DownloadUrl = string.Empty,
44-
},
45-
new Model()
46-
{
47-
Description = string.Empty,
48-
Name = KnownModelNames.Phi_mini,
49-
FileName = "phi3.5.gguf",
50-
DownloadUrl = string.Empty
51-
},
52-
new Model()
53-
{
54-
Description = string.Empty,
55-
Name = KnownModelNames.Qwen2_5_0_5b,
56-
FileName = "Qwen2.5.gguf",
57-
DownloadUrl = string.Empty
58-
},
59-
new Model()
60-
{
61-
Description = string.Empty,
62-
Name = KnownModelNames.DeepSeek_R1_8b,
63-
FileName = "DeepSeekR1-8b.gguf",
64-
DownloadUrl = string.Empty
65-
},
66-
new Model()
67-
{
68-
Description = string.Empty,
69-
Name = KnownModelNames.Fox_1_6b,
70-
FileName = "Fox-1.6b.gguf",
71-
DownloadUrl = string.Empty
72-
}
73-
};
14+
private static List<Model> Models { get; } =
15+
[
16+
new Model()
17+
{
18+
Description = string.Empty,
19+
Name = KnownModelNames.Gemma2_2b,
20+
FileName = "gemma2-2b.gguf",
21+
DownloadUrl = "https://huggingface.co/TheBloke/gemma2-2b-quantized/resolve/main/gemma2-2b-quantized.bin",
22+
},
23+
24+
new Model()
25+
{
26+
Description = string.Empty,
27+
Name = KnownModelNames.Llama3_2_3b,
28+
FileName = "Llama3.2-3b.gguf",
29+
DownloadUrl = string.Empty
30+
},
31+
32+
new Model()
33+
{
34+
Description = string.Empty,
35+
Name = KnownModelNames.Llama3_1_8b,
36+
FileName = "Llama3.1-8b.gguf",
37+
DownloadUrl = string.Empty
38+
},
39+
40+
new Model()
41+
{
42+
Description = string.Empty,
43+
Name = KnownModelNames.Llava_7b,
44+
FileName = "Llava.gguf",
45+
DownloadUrl = string.Empty,
46+
},
47+
48+
new Model()
49+
{
50+
Description = string.Empty,
51+
Name = KnownModelNames.Phi_mini,
52+
FileName = "phi3.5.gguf",
53+
DownloadUrl = string.Empty
54+
},
55+
56+
new Model()
57+
{
58+
Description = string.Empty,
59+
Name = KnownModelNames.Qwen2_5_0_5b,
60+
FileName = "Qwen2.5.gguf",
61+
DownloadUrl = string.Empty
62+
},
63+
64+
new Model()
65+
{
66+
Description = string.Empty,
67+
Name = KnownModelNames.DeepSeek_R1_8b,
68+
FileName = "DeepSeekR1-8b.gguf",
69+
DownloadUrl = string.Empty
70+
},
71+
72+
new Model()
73+
{
74+
Description = string.Empty,
75+
Name = KnownModelNames.Fox_1_6b,
76+
FileName = "Fox-1.6b.gguf",
77+
DownloadUrl = string.Empty
78+
}
79+
];
7480

7581
public static Model GetEmbeddingModel() =>
7682
new()

0 commit comments

Comments
 (0)