Skip to content

Commit

Permalink
setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Mar 8, 2024
1 parent 81fa2eb commit 337115c
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 14 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
^\.Rproj\.user$
^LICENSE\.md$
^README\.Rmd$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
50 changes: 50 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
2 changes: 1 addition & 1 deletion R/models.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ models <- function(error_call = caller_env()) {

req <- request(mistral_base_url) |>
req_url_path_append("v1", "models") |>
authenticate(call = call) |>
authenticate(error_call = call) |>
req_cache(tempdir(),
use_on_error = TRUE,
max_age = 2 * 60 * 60) # 2 hours
Expand Down
2 changes: 1 addition & 1 deletion R/stream.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @export
stream <- function(text, model = "mistral-tiny", ..., error_call = current_env()) {
check_model(error_call = error_call)
check_model(model, error_call = error_call)

req <- req_chat(text, model, stream = TRUE, error_call = error_call)
resp <- req_perform_stream(req,
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# mistral.ai

<!-- badges: start -->
[![R-CMD-check](https://github.com/tadascience/mistral.ai/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tadascience/mistral.ai/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of mistral.ai is to ...
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# mistral.ai

<!-- badges: start -->

[![R-CMD-check](https://github.com/tadascience/mistral.ai/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tadascience/mistral.ai/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of mistral.ai is to …
Expand All @@ -30,18 +32,24 @@ mistral.ai::models()

mistral.ai::chat("what is mistral ?")
#> ── assistant ───────────────────────────────────────────────────────────────────
#> Mistral is a brand name for a type of paint spray gun that is widely used for both industrial and automotive applications. The Mistral gun is manufactured by the French company Binks, and it is known for its ability to deliver a consistent, high-quality coating with minimal overspray. The Mistral gun uses compressed air to atomize and propel the paint towards the surface being coated, and it is often used for large-scale painting projects where efficiency and uniformity are important. It is commonly used in industries such as automotive manufacturing, construction, and general industrial painting.
#> Mistral is a French painter, born on December 30, 1887, in Maussane-Vésigneau, near Arles, in the south of France. His real name was Marcel Theodore Aurel Gustave Clément, but he adopted the pseudonym "Mistral" as a homage to the famous Provencal poet Frédéric Mistral.
#>
#> Mistral is best known for his vivid, colorful, and expressive paintings of the landscapes, people, and traditions of Provence. He was a key figure in the revival of interest in the art and culture of the region in the early 20th century.
#>
#> Mistral's style was influenced by the Fauves, a group of artists who sought to break away from traditional representational art and explore the expressive use of color and form. He also drew inspiration from the Impressionist and Post-Impressionist movements, as well as from the folk art and traditions of Provence.
#>
#> Mistral's work has been exhibited in major museums and galleries around the world, and he is considered one of the most important painters of the 20th century. He died in Paris on October 31, 1964.
mistral.ai::stream("fun facts mistral.ai")
#> Mistral.ai is a cutting-edge company specializing in the development of large language models. Here are some fun facts about Mistral.ai:
#> Mistral AI is a cutting-edge company based in Paris, France, developing large language models. Here are some fun facts about Mistral AI:
#>
#> 1. Mistral.ai was founded in 2021 by three French entrepreneurs: Clemence Mazel, Thomas Gottschalk, and Frédéric Bonnel.
#> 2. The name "Mistral" was inspired by the famous French poet and Nobel laureate, Frédéric Mistral, known for his mastery of the Provençal language.
#> 3. Mistral.ai's large language model, named "Mistral," is designed to understand and generate text in various languages, including English, French, Spanish, German, Italian, Portuguese, and Russian.
#> 4. Mistral.ai's language model is trained on a massive dataset, consisting of billions of words, allowing it to generate human-like text on a wide range of topics.
#> 5. Mistral.ai's model can be used for various applications, such as chatbots, content generation, language translation, and text summarization.
#> 6. Mistral.ai has partnerships with leading technology companies, including Microsoft, to integrate its language model into their products and services.
#> 7. Mistral.ai's team consists of experienced researchers and engineers in natural language processing, machine learning, and artificial intelligence.
#> 8. Mistral.ai has offices in Paris, France, and San Francisco, California.
#> 9. Mistral.ai's language model has been praised for its ability to generate creative and engaging text, making it a popular choice among writers, marketers, and content creators.
#> 10. Mistral.ai's mission is to make language models accessible to everyone, regardless of their technical expertise or resources, and to help people communicate more effectively and creatively in a globalized world.
#> 1. Founded in 2020: Mistral AI was founded in 2020 by Thomas Gotojevic, François-Xavier Carrier, and Adrien Duval, three researchers from the French National Institute for Computer Science and Applied Mathematics (INRIA).
#> 2. Focus on large language models: Mistral AI is known for its focus on developing large language models, which are artificial intelligence models capable of understanding and generating human-like text.
#> 3. Funding: The company has received significant funding, including a €100 million ($113 million) Series A round in March 2023, making it one of the largest AI funding rounds in Europe.
#> 4. Collaborations: Mistral AI has collaborated with various organizations, including the French National Center for Scientific Research (CNRS), the École des Ponts ParisTech, and the École Normale Supérieure (ENS).
#> 5. Open-source contributions: Mistral AI is committed to contributing to the open-source community. They have released various open-source projects, including the Mistral Model, a large language model that achieved state-of-the-art results on several benchmarks.
#> 6. Multilingual capabilities: Mistral AI's language models can generate text in multiple languages, including English, French, German, Italian, Spanish, and more.
#> 7. Interdisciplinary approach: Mistral AI's team comes from various backgrounds, including computer science, mathematics, physics, and linguistics, allowing for an interdisciplinary approach to AI research.
#> 8. Ethical considerations: Mistral AI is committed to addressing ethical considerations in AI research, including bias, fairness, and transparency. They have published papers on these topics and are actively engaging in discussions with stakeholders.
#> 9. Diverse applications: Mistral AI's language models have various applications, including language translation, text summarization, and text generation for creative writing and storytelling.
#> 10. Future plans: Mistral AI plans to continue developing large language models and exploring their applications in various fields, including education, healthcare, and creativity. They also aim to contribute to the development of a more ethical and transparent AI industry.
```

0 comments on commit 337115c

Please sign in to comment.