Skip to content

Commit

Permalink
Add stream: false to ollama default configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadser committed Aug 21, 2024
1 parent 5aa13de commit b661b62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/model_versions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module ModelVersionsHelper
DEFAULT_CONFIGURATION = {
'openai' => '{"model":"gpt-3.5-turbo","temperature":0.5}',
'ollama' => '{"model":"llama3.1"}',
'ollama' => '{"model":"llama3.1", "stream": false}',
'llama_cpp' => '{"n_predict":500,"temperature":0.5,"stop":["<|end|>","<|user|>","<|assistant|>","<|endoftext|>","<|system|>"]}'
}.freeze

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/controllers/model_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller } from "@hotwired/stimulus"
const DEFAULT_CONFIGURATION = {
openai: '{"model":"gpt-3.5-turbo","temperature":0.5}',
ollama: '{"model":"llama3.1"}',
ollama: '{"model":"llama3.1", "stream": false}',
llama_cpp: '{"n_predict":500,"temperature":0.5,"stop":["<|end|>","<|user|>","<|assistant|>","<|endoftext|>","<|system|>"]}'
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/model_versions/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="my-5">
<%= form.label :configuration %>
<%= form.text_field :configuration, value: JSON::dump(model_version&.configuration) || default_configuration(@model.executor_type), class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.text_field :configuration, value: model_version&.configuration ? JSON::dump(model_version&.configuration) : default_configuration(@model.executor_type), class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>

<div class="my-5">
Expand Down

0 comments on commit b661b62

Please sign in to comment.