Skip to content

Commit

Permalink
Don't try and keep _lines private
Browse files Browse the repository at this point in the history
  • Loading branch information
robatwilliams committed Dec 21, 2023
1 parent 596841f commit 9e35636
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Completions populate the cell with a custom data type which includes the complet

To obtain the text value for use in formulas, use the `VALUETOTEXT()` function. To obtain other request/response data, use dot notation to the property path (e.g. `A123.response.model`).

To view the completion data, open the entity card. The `_lines` property provides a line-by-line view of the completion content.
To view the completion data, open the entity card. The `lines` property provides a line-by-line view of the completion content.

To extract a final answer that follows a chain of thought, you could use a formula such as:

Expand Down
2 changes: 1 addition & 1 deletion src/functions/functions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function chatComplete(messages, params, invocation) {
_entityKind: COMPLETION_ENTITY_KIND,

// For visibility of newlines without needing to use cell text wrap.
_lines:
lines:
json.choices.length === 1
? json.choices[0].message.content.split('\n')
: json.choices.map((choice) => choice.message.content.split('\n')),
Expand Down
2 changes: 1 addition & 1 deletion testFramework/completionEntityStub.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function makeCompletionEntity({
basicType: 'String',
basicValue: 'openai-excel-functions:chat-completion',
},
_lines: undefined, // Not for programmatic use
lines: (content ?? '').split('\n'),
requestBody: {
type: 'Entity',
basicType: 'Error',
Expand Down

0 comments on commit 9e35636

Please sign in to comment.