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

Rename dimension parameter to dimensions everywhere #586

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

mattlindsey
Copy link
Contributor

Completes #575

@andreibondarev andreibondarev self-requested a review April 22, 2024 20:39
@andreibondarev andreibondarev linked an issue Apr 22, 2024 that may be closed by this pull request
@mattlindsey
Copy link
Contributor Author

@andreibondarev I think this is ready, but check that the last Ollama rspec test is OK.
Instead of generating a new VCR fixture, I had to rename the existing one, since I get the following error otherwise, even though ollama is running using ollama serve:

Failures:

  1) Langchain::LLM::Ollama#default_dimensionss returns size of tinydolphin embeddings
     Failure/Error:
       response = client.post("api/embeddings") do |req|
         req.body = parameters
       end

     Faraday::ResourceNotFound:
       the server responded with status 404
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/response/raise_error.rb:22:in `on_complete'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/middleware.rb:18:in `block in call'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/response.rb:42:in `on_complete'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/middleware.rb:17:in `call'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/middleware.rb:17:in `call'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/middleware.rb:17:in `call'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/rack_builder.rb:152:in `build_response'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/connection.rb:444:in `run_request'
     # /Users/mattlindsey/.rvm/gems/ruby-3.2.2/gems/faraday-2.9.0/lib/faraday/connection.rb:280:in `post'
     # ./lib/langchain/llm/ollama.rb:242:in `embed'
     # ./lib/langchain/llm/ollama.rb:48:in `block in default_dimensions'
     # ./lib/langchain/llm/ollama.rb:47:in `fetch'
     # ./lib/langchain/llm/ollama.rb:47:in `default_dimensions'
     # ./spec/langchain/llm/ollama_spec.rb:116:in `block (3 levels) in <top (required)>'
     # ./spec/support/vcr.rb:26:in `block (2 levels) in <top (required)>'

Finished in 2.28 seconds (files took 1.18 seconds to load)
408 examples, 1 failure, 3 pending

@andreibondarev
Copy link
Collaborator

@mattlindsey Looks good!

@andreibondarev andreibondarev merged commit fce34a9 into patterns-ai-core:main Apr 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename dimension: parameter to dimensions: everywhere.
2 participants