Skip to content

Commit

Permalink
Merge pull request #18 from AryaanSheth/update-quickstart
Browse files Browse the repository at this point in the history
Update QuickStart Example Code
  • Loading branch information
AryaanSheth authored Sep 5, 2024
2 parents b562ff5 + 4db490b commit 29b2070
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
gleam add gloq
```
```gleam
import gleam/io
import gloq
pub fn main() {
let key = "abc123"
let response =
new_groq_request()
|> with_key(key)
|> with_context("Explain the importance of fast language models")
|> with_user("user")
|> with_model("llama3-8b-8192")
|> send()
io.print(response)
gloq.new_groq_request()
|> gloq.with_key(key)
|> gloq.with_context("Explain the importance of fast language models")
|> gloq.with_user("user")
|> gloq.with_model("llama3-8b-8192")
|> gloq.send()
io.println(response)
}
```

Further documentation can be found at <https://hex.pm/packages/gloq>.
Expand Down

0 comments on commit 29b2070

Please sign in to comment.