Loading...
Searching...
No Matches
OpenAiRestClient Module

# OpenAiRestClient Introduction

The OpenAiRestClient module provides an API for calling OpenAi REST API services.

To use this module, use `"%requires OpenAiRestClient"` in your code.

All the public symbols in the module are defined in the OpenAiRestClient namespace.

The main classes are:

- OpenAiRestClient: this class provides the REST client API for communuication with the OpenAi REST API; it also automates authentication and authorization to the target
- OpenAiRestConnection: provides a REST connection object to OpenAi cloud services (based on the ConnectionProvider module)

Example:
  #!/usr/bin/env qore
  %new-style
  %strict-args
  %require-types
  %enable-all-warnings
  %requires OpenAiRestClient
  %requires ConnectionProvider
  OpenAiRestClient rest = get_connection("my-openai-connection");
  hash<auto> ans = rest.get("/calendar/users/me/calendarList");
  printf("%N\n", ans.body);

# Release Notes

## OpenAiRestClient v1.0

- the initial version of the OpenAiRestClient module