Skip to content

Commit 9f65387

Browse files
committed
include map header. rectify README for disabling VERBOSE_OUTPUT
1 parent b030843 commit 9f65387

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ cmake .. && make
141141
examples/[whatever]
142142
```
143143

144-
In your project, if you want a verbose output like when running the examples, add the following compilation flag:
145-
`-DOPENAICPP_VERBOSE_OUTPUT=1`.
144+
In your project, if you want to hide verbose output like when running the examples, comment the line in `examples/CMakeLists.txt` file: `// add_definitions(-DOPENAI_VERBOSE_OUTPUT=1)`.
146145

147146
For conveniency, you can put your api secret key in `build/token.txt`, to make the examples work.
148147

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0)
33
project(examples)
44

55
# You can comment/Uncomment this line if you wish to hide/show verbose output
6-
add_definitions(-DOPENAI_VERBOSE_OUTPUT=1)
6+
# add_definitions(-DOPENAI_VERBOSE_OUTPUT=1)
77

88
option(CURL_STATIC_LINKING "Set to ON to build libcurl with static linking." OFF)
99

include/openai/openai.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,27 @@
2424
#define OPENAI_HPP_
2525

2626

27+
#if OPENAI_VERBOSE_OUTPUT
28+
#pragma message ("OPENAI_VERBOSE_OUTPUT is ON")
29+
#endif
30+
2731
#include <iostream>
2832
#include <stdexcept>
2933
#include <string>
3034
#include <vector>
3135
#include <sstream>
3236
#include <mutex>
3337
#include <cstdlib>
38+
#include <map>
3439

3540
#ifndef CURL_STATICLIB
36-
# include <curl/curl.h>
41+
#include <curl/curl.h>
3742
#else
38-
# include "curl/curl.h"
43+
#include "curl/curl.h"
3944
#endif
4045

4146
#include "json.hpp" // nlohmann/json
4247

43-
#if OPENAI_VERBOSE_OUTPUT
44-
# pragma message ("OPENAI_VERBOSE_OUTPUT is ON")
45-
#endif
46-
4748
namespace openai {
4849

4950
namespace _detail {

0 commit comments

Comments
 (0)