Preparing search index...
The search index is not available
@webeleon/nestjs-openai
@webeleon/nestjs-openai
OpenAIService
Class OpenAIService
Hierarchy
OpenAIService
Index
Constructors
constructor
Properties
config
openai
openai
Provider
Methods
chat
generate
Image
Png
Buffers
generate
Image
Urls
Constructors
constructor
new
OpenAIService
(
config
,
openaiProvider
)
:
OpenAIService
Parameters
config
:
any
openaiProvider
:
OpenAIClientProvider
Returns
OpenAIService
Properties
Private
Readonly
config
config
:
any
openai
openai
:
OpenAI
Private
Readonly
openai
Provider
openai
Provider
:
OpenAIClientProvider
Methods
chat
chat
(
__namedParameters
)
:
Promise
<
string
[]
>
Parameters
__namedParameters
:
{
history
?:
Message
[]
;
numberOfCompletions
?:
number
;
prompt
:
string
;
role
?:
Role
;
temperature
?:
number
;
userId
:
string
;
}
Optional
history
?:
Message
[]
Optional
number
Of
Completions
?:
number
prompt
:
string
Optional
role
?:
Role
Optional
temperature
?:
number
user
Id
:
string
Returns
Promise
<
string
[]
>
generate
Image
Png
Buffers
generate
Image
Png
Buffers
(
__namedParameters
)
:
Promise
<
Buffer
[]
>
Parameters
__namedParameters
:
GenerateImageInput
Returns
Promise
<
Buffer
[]
>
generate
Image
Urls
generate
Image
Urls
(
__namedParameters
)
:
Promise
<
string
[]
>
Parameters
__namedParameters
:
GenerateImageInput
Returns
Promise
<
string
[]
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
config
openai
openai
Provider
chat
generate
Image
Png
Buffers
generate
Image
Urls
@webeleon/nestjs-
openai
Models
Role
Message
OpenAIModule
OpenAIService
OpenAIModule
Async
Options
OpenAIModule
Options
CONFIG_
OPTIONS
Generated using
TypeDoc