modified: content/2024-02-17-integrating-openai-with-dry-sample-chat-game.rst

This commit is contained in:
Russell Ballestrini 2024-02-19 11:28:56 -05:00
parent fe0db60e78
commit fdc2add320

View file

@ -58,6 +58,8 @@ Follow these steps to integrate OpenAI with the Sample Chat game:
2. **Update the CMake Configuration**
Note: update ``PROJECT_SOURCE_DIR`` with your file path.
Apply the following diff to `CMakeLists.txt` to include the OpenAI C++ client as well as cURL in your dry project:
.. code-block:: diff
@ -76,6 +78,9 @@ Follow these steps to integrate OpenAI with the Sample Chat game:
+# Globally link cURL to all targets
+link_libraries(${CURL_LIBRARIES})
+
+# Assuming this is set to your project's root directory
+set(PROJECT_SOURCE_DIR /home/fox/git/dry)
+
+# Create a symbolic link for openai
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${PROJECT_SOURCE_DIR}/Source/ThirdParty/openai