Skip to content

Commit

Permalink
Added bounds on dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharad committed Oct 16, 2024
1 parent f1a1d4a commit fe04bb3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ This library allows you to interact with Ollama, a tool that lets you run large
{-# LANGUAGE OverloadedStrings #-}
module Lib where

import Ollama
import Ollama (GenerateOps(..), defaultGenerateOps, generate)

main :: IO ()
main = do
generate "llama3.1" "Is haskell a good language?"
void $
generate
defaultGenerateOps
{ modelName = "llama3.2"
, prompt = "what is functional programming?"
, stream = Just (T.putStr . Ollama.response_, pure ())
}
```

### Output
Expand All @@ -32,6 +38,8 @@ Whether Haskell is a "good" language depends on what you're looking for in a pro
3. **Garbage collection**: Haskell handles memory management automatically, freeing you from worries about manual memory deallocation.
```

You can find practical examples demonstrating how to use the library in the `src/Lib.hs` file.

## Prerequisite

Make sure you have [Ollama](https://ollama.com) installed and running on your local machine. You can download it from [here](https://ollama.com/download).
Expand All @@ -57,8 +65,8 @@ Make sure you have [Ollama](https://ollama.com) installed and running on your lo

- [x] Improve documentation
- [x] Add tests.
- [ ] Add examples.
- [ ] Add CI/CD pipeline.
- [x] Add examples.
- [x] Add CI/CD pipeline.
- [ ] `options` parameter in `generate`.

Stay tuned for future updates and improvements!
Expand Down
13 changes: 7 additions & 6 deletions ollama-haskell.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ library
-- other-modules:
-- other-extensions:
build-depends: base ^>=4.18
, http-client
, text
, bytestring
, aeson
, time
, http-types
, aeson >= 2.2.1 && < 2.3
, bytestring >= 0.11.5 && < 0.12
, text >= 2.0.2 && < 2.1
, time >= 1.12.2 && < 1.13
, http-client >= 0.7.17 && < 0.8
, http-types >= 0.12.4 && < 0.13

hs-source-dirs: src
default-language: GHC2021

Expand Down

0 comments on commit fe04bb3

Please sign in to comment.