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.

Program.cs 581 B

2 years ago
123456789101112131415161718192021222324252627
  1. using LLama.WebAPI.Services;
  2. var builder = WebApplication.CreateBuilder(args);
  3. // Add services to the container.
  4. builder.Services.AddControllers();
  5. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
  6. builder.Services.AddEndpointsApiExplorer();
  7. builder.Services.AddSwaggerGen();
  8. builder.Services.AddSingleton<ChatService>();
  9. var app = builder.Build();
  10. // Configure the HTTP request pipeline.
  11. if (app.Environment.IsDevelopment())
  12. {
  13. app.UseSwagger();
  14. app.UseSwaggerUI();
  15. }
  16. app.UseAuthorization();
  17. app.MapControllers();
  18. app.Run();

C#/.NET上易用的LLM高性能推理框架,支持LLaMA和LLaVA系列模型。