Skip to content

Commit

Permalink
v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kumeS committed May 9, 2024
1 parent 05331ed commit da56b6c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: chatAI4R
Type: Package
Title: Chat-Based Interactive Artificial Intelligence for R
Version: 0.3.1
Date: 2024-02-18
Version: 0.3.2
Date: 2024-05-10
Authors@R: c(
person (given = "Satoshi", family = "Kume",
role = c("aut", "cre"),
Expand Down
2 changes: 1 addition & 1 deletion R/discussion_flow_v1.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DEEPL <- any(names(Sys.getenv()) == "DeepL_API_KEY")

#Create graph nodes
set.seed(123)
g <- igraph::graph(c(), directed = TRUE)
g <- igraph::make_graph(c(), directed = TRUE)
g <- igraph::add_vertices(g, 4, name = c("H", "A", "B", "C"))
layout <- igraph::layout_nicely(g)*10
#layout <- igraph::layout_with_fr(g, area = vcount(g)^3)
Expand Down
2 changes: 1 addition & 1 deletion R/discussion_flow_v2.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ DEEPL <- any(names(Sys.getenv()) == "DeepL_API_KEY")

#Create graph nodes
set.seed(123)
g <- igraph::graph(c(), directed = TRUE)
g <- igraph::make_graph(c(), directed = TRUE)
g <- igraph::add_vertices(g, 4, name = c("H", "A", "B", "C"))
layout <- igraph::layout_nicely(g)*10
#layout <- igraph::layout_with_fr(g, area = vcount(g)^3)
Expand Down
25 changes: 9 additions & 16 deletions R/deepinfra4R.R → inst/OtherScript/deepinfra4R.R
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
R Function for Deepinfra APIs

この関数は、Deepinfra APIsを使った実行をサポートします。
Llama-2CodeLlamaPhindなどをDeepinfraAPIを使って実行します。

使用前に、`Sys.setenv(DEEPINFRA_API_KEY = "Your API key")`を定義してください。
prompt: string, text to generate from


Parameter_Setting
max_new_tokens: integer, default value is 512, maximum length of the newly generated generated text.
temperature: number, default value is 0.7, temperature to use for sampling

top_p: number, default value is 0.9, Sample from the set of tokens with highest probability such that sum of probabilies is higher than p.


#R Function for Deepinfra APIs

#この関数は、Deepinfra APIsを使った実行をサポートします。
#Llama-2、CodeLlama、PhindなどをDeepinfraのAPIを使って実行します。
#使用前に、`Sys.setenv(DEEPINFRA_API_KEY = "Your API key")`を定義してください。
#prompt: string, text to generate from

#Parameter_Setting
#max_new_tokens: integer, default value is 512, maximum length of the newly generated generated text.
#temperature: number, default value is 0.7, temperature to use for sampling
#top_p: number, default value is 0.9, Sample from the set of tokens with highest probability such that sum of probabilies is higher than p.


deepinfra4R <- function(prompt,
Expand Down

0 comments on commit da56b6c

Please sign in to comment.