prediction with context
This commit is contained in:
@@ -39,9 +39,14 @@ class OilPredictionResource extends Resource
|
||||
->sortable(),
|
||||
TextColumn::make('source')
|
||||
->badge()
|
||||
->formatStateUsing(fn (PredictionSource $state) => strtoupper($state->value))
|
||||
->formatStateUsing(fn (PredictionSource $state) => match ($state) {
|
||||
PredictionSource::Llm => 'LLM',
|
||||
PredictionSource::LlmWithContext => 'LLM + Context',
|
||||
PredictionSource::Ewma => 'EWMA',
|
||||
})
|
||||
->color(fn (PredictionSource $state) => match ($state) {
|
||||
PredictionSource::Llm => 'success',
|
||||
PredictionSource::LlmWithContext => 'warning',
|
||||
PredictionSource::Ewma => 'info',
|
||||
}),
|
||||
TextColumn::make('direction')
|
||||
@@ -66,6 +71,7 @@ class OilPredictionResource extends Resource
|
||||
SelectFilter::make('source')
|
||||
->options([
|
||||
PredictionSource::Llm->value => 'LLM',
|
||||
PredictionSource::LlmWithContext->value => 'LLM + Context',
|
||||
PredictionSource::Ewma->value => 'EWMA',
|
||||
]),
|
||||
SelectFilter::make('direction')
|
||||
@@ -97,9 +103,14 @@ class OilPredictionResource extends Resource
|
||||
TextEntry::make('predicted_for')->date('d M Y'),
|
||||
TextEntry::make('source')
|
||||
->badge()
|
||||
->formatStateUsing(fn (PredictionSource $state) => strtoupper($state->value))
|
||||
->formatStateUsing(fn (PredictionSource $state) => match ($state) {
|
||||
PredictionSource::Llm => 'LLM',
|
||||
PredictionSource::LlmWithContext => 'LLM + Context',
|
||||
PredictionSource::Ewma => 'EWMA',
|
||||
})
|
||||
->color(fn (PredictionSource $state) => match ($state) {
|
||||
PredictionSource::Llm => 'success',
|
||||
PredictionSource::LlmWithContext => 'warning',
|
||||
PredictionSource::Ewma => 'info',
|
||||
}),
|
||||
TextEntry::make('direction')
|
||||
|
||||
Reference in New Issue
Block a user