You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using LLama.Common;
-
- namespace LLama.Examples.NewVersion
- {
- public class GetEmbeddings
- {
- public static void Run()
- {
- Console.Write("Please input your model path: ");
- var modelPath = Console.ReadLine();
- var embedder = new LLamaEmbedder(new ModelParams(modelPath));
-
- while (true)
- {
- Console.Write("Please input your text: ");
- Console.ForegroundColor = ConsoleColor.Green;
- var text = Console.ReadLine();
- Console.ForegroundColor = ConsoleColor.White;
-
- Console.WriteLine(string.Join(", ", embedder.GetEmbeddings(text)));
- Console.WriteLine();
- }
- }
- }
- }
|