diff options
author | bobzel <zzzman@gmail.com> | 2024-05-20 13:13:11 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-05-20 13:13:11 -0400 |
commit | a5aa41e60dc72881e1aa2f14743b9f00c1160eed (patch) | |
tree | a2f275118455c1f34b76aeca694325ff2839b3fc /src/client/apis/gpt/GPT.ts | |
parent | aab428589c07ef6ecb92d3c2ed7fe5f6e8ff9104 (diff) |
fixed pivotView to provide a white background to docs with no background so that images will show up, and so text doesn't blend in to column. changed image labeling to show a pivot view and assigne metadata instead of creating collections.
Diffstat (limited to 'src/client/apis/gpt/GPT.ts')
-rw-r--r-- | src/client/apis/gpt/GPT.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts index 455352068..7af71a6a2 100644 --- a/src/client/apis/gpt/GPT.ts +++ b/src/client/apis/gpt/GPT.ts @@ -119,7 +119,7 @@ const gptGetEmbedding = async (src: string): Promise<number[]> => { }); // Assume the embeddingResponse structure is correct; adjust based on actual API response - const embedding = embeddingResponse.data[0].embedding; + const { embedding } = embeddingResponse.data[0]; return embedding; } catch (err) { console.log(err); @@ -155,9 +155,8 @@ const gptImageLabel = async (src: string): Promise<string> => { }); if (response.choices[0].message.content) { return response.choices[0].message.content; - } else { - return 'Missing labels'; } + return 'Missing labels'; } catch (err) { console.log(err); return 'Error connecting with API'; |