FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
LLamaSharp/LLama.WebAPI/Program.cs at master · NamOpusMeum/LLamaSharp · GitHub
NamOpusMeum
LLamaSharp
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
LLamaSharp
/
LLama.WebAPI
/
Program.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (23 loc) · 741 Bytes
Breadcrumbs
LLamaSharp
/
LLama.WebAPI
/
Program.cs
Copy path
File metadata and controls
32 lines (23 loc) · 741 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using
LLama
.
WebAPI
.
Services
;
var
builder
=
WebApplication
.
CreateBuilder
(
args
)
;
// Add services to the container.
builder
.
Services
.
AddControllers
(
)
;
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder
.
Services
.
AddEndpointsApiExplorer
(
)
;
builder
.
Services
.
AddSwaggerGen
(
)
;
builder
.
Services
.
AddSingleton
<
StatefulChatService
>
(
)
;
builder
.
Services
.
AddScoped
<
StatelessChatService
>
(
)
;
var
app
=
builder
.
Build
(
)
;
app
.
UseRouting
(
)
;
// Configure the HTTP request pipeline.
if
(
app
.
Environment
.
IsDevelopment
(
)
)
{
app
.
UseSwagger
(
)
;
app
.
UseSwaggerUI
(
)
;
}
app
.
UseAuthorization
(
)
;
app
.
UseEndpoints
(
endpoints
=>
{
_
=
endpoints
.
MapControllers
(
)
;
}
)
;
app
.
Run
(
)
;
Back
|
FazBrowse Home
|
New Git URL