Skip to content

Commit

Permalink
Improved documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 5, 2024
1 parent 8b32a44 commit 4bbee3e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: bundle exec bake utopia:project:static --force no

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: docs

Expand All @@ -55,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion async-ollama.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/socketry/async-ollama"

spec.metadata = {
"documentation_uri" => "https://socketry.github.io/falcon/",
"documentation_uri" => "https://socketry.github.io/async-ollama/",
"source_code_uri" => "https://github.com/socketry/async-ollama.git",
}

Expand Down
47 changes: 47 additions & 0 deletions guides/getting-started/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Getting Started

This guide explains how to get started with the `async-ollama` gem.

## Installation

Add the gem to your project:

~~~ bash
$ bundle add async-ollama
~~~

## Core Concepts

- The {ruby Async::Ollama::Client} is used for interacting with the Ollama server.
- {ruby Async::Ollama::Generate} represents a single conversation response (with context) from the Ollama server.

## Example

~~~ ruby
require 'async/ollama'

Async::Ollama::Client.open do |client|
generator = client.generate("Can you please tell me the first 10 digits of PI?")
puts generator.response
# Of course! The first 10 digits of pi are:
#
# 3.141592653
end
~~~

### Using a Specific Model

You can specify a model to use for generating responses:

~~~ ruby
require 'async/ollama'

Async::Ollama::Client.open do |client|
generator = client.generate("Can you please tell me the first 10 digits of PI?", model: "llama3")
puts generator.response
# The first 10 digits of Pi (π) are:
#
# 3.141592653
#
# Let me know if you'd like more!
end
2 changes: 2 additions & 0 deletions guides/links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
getting-started:
order: 0
8 changes: 5 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Provides an interface for accessing the Ollama HTTP interface.

Please see the [project documentation](https://socketry.github.io/async-ollama/) for more details.

- [Getting Started](https://socketry.github.io/async-ollama/guides/getting-started/index) - This guide explains how to get started with the `async-ollama` gem.

## Contributing

We welcome contributions to this project.
Expand All @@ -20,8 +22,8 @@ We welcome contributions to this project.

### Developer Certificate of Origin

This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.

### Contributor Covenant
### Community Guidelines

This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.

0 comments on commit 4bbee3e

Please sign in to comment.