Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker config to include OLLAMA_ENDPOINT #18

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
@@ -31,6 +31,8 @@ SEQ_ADMIN_PASSWORD=<your_seq_admin_password>
# Use '*' as a wildcard to allow all origins, but this is not recommended for production.
CORS_ALLOWED_ORIGINS=*

#URL for the Ollama service (e.g., * or http://localhost:11434)
OLLAMA_ENDPOINT=http://localhost:11434

# === Model Keys ===
# Keys for accessing services with LLM models
1 change: 1 addition & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ services:
- SEQ__URL=${SEQ_URL}
- SEQ__API_KEY=${SEQ_API_KEY}
- CORS__ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
#- OLLAMA__ENDPOINT=${OLLAMA_ENDPOINT} #OPTIONAL
ports:
- 8080:8080
networks:

Unchanged files with check annotations Beta

public string UserAgent { get; }
public IIdentityContext Identity { get; }
public Context() : this(Guid.NewGuid(), $"{Guid.NewGuid():N}", null)

Check warning on line 15 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
{
}
public Context(HttpContext context) : this(context.TryGetCorrelationId(), context.TraceIdentifier,
new IdentityContext(context.User), context.GetUserIpAddress(),
context.Request.Headers["user-agent"])

Check warning on line 21 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Possible null reference argument for parameter 'userAgent' in 'Context.Context(Guid? correlationId, string traceId, IIdentityContext identity = null, string ipAddress = null, string userAgent = null)'.
{
}
public Context(Guid? correlationId, string traceId, IIdentityContext identity = null, string ipAddress = null,

Check warning on line 25 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 25 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 25 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 25 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
string userAgent = null)

Check warning on line 26 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/Context.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
{
CorrelationId = correlationId ?? Guid.NewGuid();
TraceId = traceId;
{
public bool IsAuthenticated { get; }
public Guid Id { get; }
public string? Role { get; }

Check warning on line 10 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/IdentityContext.cs

GitHub Actions / build

Nullability of reference types in return type of 'string? IdentityContext.Role.get' doesn't match implicitly implemented member 'string IIdentityContext.Role.get' (possibly because of nullability attributes).

Check warning on line 10 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/IdentityContext.cs

GitHub Actions / build

Nullability of reference types in return type of 'string? IdentityContext.Role.get' doesn't match implicitly implemented member 'string IIdentityContext.Role.get' (possibly because of nullability attributes).
public Dictionary<string, IEnumerable<string>>? Claims { get; }

Check warning on line 11 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/IdentityContext.cs

GitHub Actions / build

Nullability of reference types in return type of 'Dictionary<string, IEnumerable<string>>? IdentityContext.Claims.get' doesn't match implicitly implemented member 'Dictionary<string, IEnumerable<string>> IIdentityContext.Claims.get' (possibly because of nullability attributes).

Check warning on line 11 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/IdentityContext.cs

GitHub Actions / build

Nullability of reference types in return type of 'Dictionary<string, IEnumerable<string>>? IdentityContext.Claims.get' doesn't match implicitly implemented member 'Dictionary<string, IEnumerable<string>> IIdentityContext.Claims.get' (possibly because of nullability attributes).
private IdentityContext() { }
return app;
}
public static IHostBuilder UseLogging(this IHostBuilder builder, Action<LoggerConfiguration> configure = null,

Check warning on line 39 in src/Shared/StellarChat.Shared.Infrastructure/Observability/Logging/Extensions.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 39 in src/Shared/StellarChat.Shared.Infrastructure/Observability/Logging/Extensions.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
string loggerSectionName = LoggerSectionName,
string appSectionName = AppSectionName)
=> builder.UseSerilog((context, loggerConfiguration) =>
public IContext Context
{
get => Holder.Value?.Context;

Check warning on line 11 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/ContextAccessor.cs

GitHub Actions / build

Possible null reference return.

Check warning on line 11 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/ContextAccessor.cs

GitHub Actions / build

Possible null reference return.
set
{
var holder = Holder.Value;
if (holder != null)
{
holder.Context = null;

Check warning on line 17 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/ContextAccessor.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 17 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/ContextAccessor.cs

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
}
if (value != null)
private class ContextHolder
{
public IContext Context;

Check warning on line 29 in src/Shared/StellarChat.Shared.Infrastructure/Contexts/ContextAccessor.cs

GitHub Actions / build

Non-nullable field 'Context' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
}
}
public IQueryable<TDocument> AsQueryable() => Collection.AsQueryable();
public Task<TDocument> GetAsync(TIdentifiable id)
=> GetAsync(e => e.Id.Equals(id));

Check warning on line 21 in src/Shared/StellarChat.Shared.Infrastructure/DAL/Mongo/Repositories/MongoRepository.cs

GitHub Actions / build

Dereference of a possibly null reference.
public Task<TDocument> GetAsync(Expression<Func<TDocument, bool>> predicate)
=> Collection.Find(predicate).SingleOrDefaultAsync();