spec/ollama/commands/generate_spec.rb in ollama-ruby-0.1.0 vs spec/ollama/commands/generate_spec.rb in ollama-ruby-0.2.0

- old
+ new

@@ -10,20 +10,20 @@ generate = described_class.new(model: 'llama3.1', prompt: 'Hello World') expect(generate.as_json).to include( model: 'llama3.1', prompt: 'Hello World' ) expect(generate.to_json).to eq( - '{"json_class":"Ollama::Commands::Generate","model":"llama3.1","prompt":"Hello World"}' + '{"model":"llama3.1","prompt":"Hello World"}' ) end it 'can perform' do generate = described_class.new(model: 'llama3.1', prompt: 'Hello World', stream: true) generate.client = ollama = double('Ollama::Client') expect(ollama).to receive(:request). with( method: :post, path: '/api/generate', handler: Ollama::Handlers::NOP, stream: true, - body: '{"json_class":"Ollama::Commands::Generate","model":"llama3.1","prompt":"Hello World","stream":true}' + body: '{"model":"llama3.1","prompt":"Hello World","stream":true}' ) generate.perform(Ollama::Handlers::NOP) end end