Skip to content

Commit

Permalink
fix: status code
Browse files Browse the repository at this point in the history
  • Loading branch information
Apoorva64 committed Oct 20, 2024
1 parent 5d4fdbc commit 935d56d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 29 deletions.
2 changes: 2 additions & 0 deletions config/ollama/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ spec:
env:
- name: OLLAMA_LOG_LEVEL
value: "DEBUG"
- name: OLLAMA_DEBUG
value: "1"
---
apiVersion: v1
kind: Service
Expand Down
2 changes: 1 addition & 1 deletion config/samples/ollama_v1_custommodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: mario-custommodel-sample
spec:
modelName: mario-custommodel-sample
modelName: mario-custommodel-sample:v1
modelFile: >-
FROM llama3.2
# sets the temperature to 1 [higher is more creative, lower is more coherent]
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/custommodel_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (r *CustomModelReconciler) Reconcile(ctx context.Context, req ctrl.Request)
Modelfile: &CustomModel.Spec.ModelFile,
Stream: &stream,
})
if err != nil {
if err != nil || res.StatusCode() != 200 {
logger.Error(err, "unable to create CustomModel")
return ctrl.Result{}, err
}
Expand Down
44 changes: 20 additions & 24 deletions internal/ollama_client/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ paths:
name:
type: string
description: Name of the model to create (required)
path:
type: string
description: Path to the Modelfile
modelfile:
type: string
description: The Modelfile contents
Expand Down

0 comments on commit 935d56d

Please sign in to comment.