Skip to content

Commit f9127d4

Browse files
committed
Updated style [skip ci]
1 parent a86725e commit f9127d4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/cohere/example.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using json = nlohmann::json;
1313

1414
// https://docs.cohere.com/reference/embed
15-
std::vector<std::string> embed(const std::vector<std::string>& texts, const std::string& input_type, char *api_key) {
15+
std::vector<std::string> embed(const std::vector<std::string>& texts, const std::string& input_type, char* api_key) {
1616
std::string url{"https://api.cohere.com/v2/embed"};
1717
json data{
1818
{"texts", texts},
@@ -45,7 +45,7 @@ std::vector<std::string> embed(const std::vector<std::string>& texts, const std:
4545
}
4646

4747
int main() {
48-
char *api_key = std::getenv("CO_API_KEY");
48+
char* api_key = std::getenv("CO_API_KEY");
4949
if (!api_key) {
5050
std::cout << "Set CO_API_KEY" << std::endl;
5151
return 1;

examples/disco/example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Dataset<int, std::string> load_movielens(const std::string& path) {
5959

6060
int main() {
6161
// https://grouplens.org/datasets/movielens/100k/
62-
char *movielens_path = std::getenv("MOVIELENS_100K_PATH");
62+
char* movielens_path = std::getenv("MOVIELENS_100K_PATH");
6363
if (!movielens_path) {
6464
std::cout << "Set MOVIELENS_100K_PATH" << std::endl;
6565
return 1;

examples/openai/example.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using json = nlohmann::json;
1111

1212
// https://platform.openai.com/docs/guides/embeddings/how-to-get-embeddings
1313
// input can be an array with 2048 elements
14-
std::vector<std::vector<float>> embed(const std::vector<std::string>& input, char *api_key) {
14+
std::vector<std::vector<float>> embed(const std::vector<std::string>& input, char* api_key) {
1515
std::string url{"https://api.openai.com/v1/embeddings"};
1616
json data{
1717
{"input", input},
@@ -37,7 +37,7 @@ std::vector<std::vector<float>> embed(const std::vector<std::string>& input, cha
3737
}
3838

3939
int main() {
40-
char *api_key = std::getenv("OPENAI_API_KEY");
40+
char* api_key = std::getenv("OPENAI_API_KEY");
4141
if (!api_key) {
4242
std::cout << "Set OPENAI_API_KEY" << std::endl;
4343
return 1;

0 commit comments

Comments
 (0)