load1n9 / openai

Unofficial Deno wrapper for the Open Ai api
MIT License
73 stars 23 forks source link

fix: update message definition #5

Closed ferdousbhai closed 1 year ago

ferdousbhai commented 1 year ago

The message type can only have 3 possible roles: "system" | "assistant" | "user". Messages can contain an optional name field. This is helpful in some applications, here's an example from OpenAI: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb.

lino-levan commented 1 year ago

Seems like this got added pretty recent. LGTM.

lino-levan commented 1 year ago

@ferdousbhai please deno fmt.

lino-levan commented 1 year ago

@load1n9 please publish a new version after this gets merged

ferdousbhai commented 1 year ago

Sure, sorry, my first pull request. 😅