Skip to content

Commit

Permalink
improved the help when discussing using env vars for Google and Azure…
Browse files Browse the repository at this point in the history
… creds and give the Google Cred dialog a scroll bar (for both Google Translate and VertexAI)
  • Loading branch information
bobeaton committed Mar 9, 2024
1 parent e77f940 commit 8297090
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 65 deletions.
39 changes: 21 additions & 18 deletions redist/Help/Azure_OpenAI_Translate_Plug-in_About_box.htm
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
<o:DocumentProperties>
<o:Author>Bob Eaton</o:Author>
<o:LastAuthor>Bob Eaton</o:LastAuthor>
<o:Revision>96</o:Revision>
<o:TotalTime>6496</o:TotalTime>
<o:Revision>97</o:Revision>
<o:TotalTime>6497</o:TotalTime>
<o:Created>2022-07-14T21:18:00Z</o:Created>
<o:LastSaved>2024-03-08T16:38:00Z</o:LastSaved>
<o:LastSaved>2024-03-09T15:34:00Z</o:LastSaved>
<o:Pages>6</o:Pages>
<o:Words>1242</o:Words>
<o:Characters>7082</o:Characters>
<o:Words>1250</o:Words>
<o:Characters>7127</o:Characters>
<o:Lines>59</o:Lines>
<o:Paragraphs>16</o:Paragraphs>
<o:CharactersWithSpaces>8308</o:CharactersWithSpaces>
<o:CharactersWithSpaces>8361</o:CharactersWithSpaces>
<o:Version>16.00</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
Expand Down Expand Up @@ -1508,7 +1508,7 @@
@list l0
{mso-list-id:-126;
mso-list-type:simple;
mso-list-template-ids:1455221358;}
mso-list-template-ids:-1692365750;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet 3";
Expand All @@ -1521,7 +1521,7 @@
@list l1
{mso-list-id:-125;
mso-list-type:simple;
mso-list-template-ids:-637639466;}
mso-list-template-ids:-17822820;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet 2";
Expand All @@ -1533,7 +1533,7 @@
@list l2
{mso-list-id:-119;
mso-list-type:simple;
mso-list-template-ids:-439446012;}
mso-list-template-ids:321796332;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet";
Expand Down Expand Up @@ -1756,20 +1756,20 @@ <h3><span style='mso-fareast-font-family:"Times New Roman"'>Setup Tab<o:p></o:p>
<p class=spacesingle><o:p>&nbsp;</o:p></p>

<p class=MsoList style='margin-left:.25in;mso-list:l3 level1 lfo7;tab-stops:
.5in'><a name="_Ref89938859"></a><a name="_Ref133733169"></a><a
.5in'><a name="_Ref133733169"></a><a name="_Ref89938859"></a><a
name=TransductionType></a><a name=SourceLanguage></a><![if !supportLists]><span
style='mso-bookmark:_Ref89938859'><span style='mso-bookmark:_Ref133733169'><span
style='mso-bookmark:_Ref133733169'><span style='mso-bookmark:_Ref89938859'><span
style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span></span><![endif]><span style='mso-bookmark:_Ref89938859'><span
style='mso-bookmark:_Ref133733169'>This text box is for entering the Source
</span></span></span></span><![endif]><span style='mso-bookmark:_Ref133733169'><span
style='mso-bookmark:_Ref89938859'>This text box is for entering the Source
language of the input text for the translation operation. </span></span></p>

<p class=MsoList style='margin-left:.25in;mso-list:l3 level1 lfo7;tab-stops:
.5in'><a name="_Ref89954112"></a><a name="_Ref133733171"></a><a
name=TargetLanguage></a><![if !supportLists]><span style='mso-bookmark:_Ref89954112'><span
style='mso-bookmark:_Ref133733171'><span style='mso-list:Ignore'>2)<span
.5in'><a name="_Ref133733171"></a><a name="_Ref89954112"></a><a
name=TargetLanguage></a><![if !supportLists]><span style='mso-bookmark:_Ref133733171'><span
style='mso-bookmark:_Ref89954112'><span style='mso-list:Ignore'>2)<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><![endif]><span
style='mso-bookmark:_Ref89954112'><span style='mso-bookmark:_Ref133733171'>This
style='mso-bookmark:_Ref133733171'><span style='mso-bookmark:_Ref89954112'>This
text box is for entering the Target language the input text should be
translated into.</span></span></p>

Expand Down Expand Up @@ -2001,7 +2001,10 @@ <h4><a name="_Saving_the_converter_in_the_System_"></a><span style='mso-fareast-
blade just below the <span class=MsoIntenseReference>Keys and Endpoint</span>
blade in Figure 3 above.</p>

<p class=MsoBodyText>Note that when the translator is used in different client
<h4><span style='mso-fareast-font-family:"Times New Roman"'>Using Environment
Variables to Store Azure Open AI Credentials<o:p></o:p></span></h4>

<p class=MsoBodyText>When the translator is used in different client
applications (e.g. <span class=MsoSubtleEmphasis>Paratext</span>, <span
class=MsoSubtleEmphasis>Word</span>, or the <span class=MsoSubtleEmphasis>Clipboard
EncConverter</span>), the settings (including the key mentioned above) are
Expand Down
75 changes: 37 additions & 38 deletions redist/Help/Vertex_AI_Translate_Plug-in_About_box.htm
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
<o:DocumentProperties>
<o:Author>Bob Eaton</o:Author>
<o:LastAuthor>Bob Eaton</o:LastAuthor>
<o:Revision>128</o:Revision>
<o:TotalTime>6545</o:TotalTime>
<o:Revision>130</o:Revision>
<o:TotalTime>6546</o:TotalTime>
<o:Created>2022-07-14T21:18:00Z</o:Created>
<o:LastSaved>2024-03-08T16:49:00Z</o:LastSaved>
<o:LastSaved>2024-03-09T15:36:00Z</o:LastSaved>
<o:Pages>6</o:Pages>
<o:Words>1330</o:Words>
<o:Characters>7583</o:Characters>
<o:Words>1340</o:Words>
<o:Characters>7641</o:Characters>
<o:Lines>63</o:Lines>
<o:Paragraphs>17</o:Paragraphs>
<o:CharactersWithSpaces>8896</o:CharactersWithSpaces>
<o:CharactersWithSpaces>8964</o:CharactersWithSpaces>
<o:Version>16.00</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
Expand All @@ -51,7 +51,6 @@
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>150</w:Zoom>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
Expand Down Expand Up @@ -1484,9 +1483,6 @@
span.userinterface00
{mso-style-name:userinterface0;
mso-style-unhide:no;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
Expand All @@ -1512,7 +1508,7 @@
@list l0
{mso-list-id:-126;
mso-list-type:simple;
mso-list-template-ids:-1392103656;}
mso-list-template-ids:698908028;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet 3";
Expand All @@ -1525,7 +1521,7 @@
@list l1
{mso-list-id:-125;
mso-list-type:simple;
mso-list-template-ids:-351100530;}
mso-list-template-ids:131136226;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet 2";
Expand All @@ -1537,7 +1533,7 @@
@list l2
{mso-list-id:-119;
mso-list-type:simple;
mso-list-template-ids:-332359486;}
mso-list-template-ids:917922746;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-style-link:"List Bullet";
Expand Down Expand Up @@ -1780,14 +1776,14 @@ <h3><span style='mso-fareast-font-family:"Times New Roman"'>Setup Tab<o:p></o:p>
for help.</span></p>

<p class=MsoList style='margin-left:.25in;mso-list:l3 level1 lfo7;tab-stops:
.5in'><a name="_Ref159001677"></a><a name="_Ref89954112"></a><a
name="_Ref133733171"></a><a name=LocationId></a><![if !supportLists]><span
style='mso-bookmark:_Ref159001677'><span style='mso-bookmark:_Ref89954112'><span
style='mso-bookmark:_Ref133733171'><span style='mso-list:Ignore'>2)<span
.5in'><a name="_Ref159001677"></a><a name="_Ref133733171"></a><a
name="_Ref89954112"></a><a name=LocationId></a><![if !supportLists]><span
style='mso-bookmark:_Ref159001677'><span style='mso-bookmark:_Ref133733171'><span
style='mso-bookmark:_Ref89954112'><span style='mso-list:Ignore'>2)<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><![endif]><span
style='mso-bookmark:_Ref159001677'><span style='mso-bookmark:_Ref89954112'><span
style='mso-bookmark:_Ref133733171'>This text box is for entering the Location
Id of your Vertex AI resource.</span></span> See </span><a
style='mso-bookmark:_Ref159001677'><span style='mso-bookmark:_Ref133733171'><span
style='mso-bookmark:_Ref89954112'>This text box is for entering the Location Id
of your Vertex AI resource.</span></span> See </span><a
href="https://cloud.google.com/vertex-ai/docs/start/introduction-unified-platform"><span
style='mso-bookmark:_Ref159001677'>Google Cloud help</span><span
style='mso-bookmark:_Ref159001677'></span></a><span style='mso-bookmark:_Ref159001677'>
Expand All @@ -1798,7 +1794,7 @@ <h3><span style='mso-fareast-font-family:"Times New Roman"'>Setup Tab<o:p></o:p>
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>This
text box is for entering the Publisher of your Vertex AI resource. (e.g. for a <span
class=MsoSubtleEmphasis>chat-bison</span> AI resource, the publisher is <span
class=GramE><span class=MsoSubtleEmphasis>google</span></span>.</p>
class=MsoSubtleEmphasis>google</span>.</p>

<p class=MsoList style='margin-left:.25in;mso-list:l3 level1 lfo7;tab-stops:
.5in'><a name=ModelId></a><![if !supportLists]><span style='mso-list:Ignore'>4)<span
Expand Down Expand Up @@ -1867,11 +1863,11 @@ <h3><span style='mso-fareast-font-family:"Times New Roman"'>Setup Tab<o:p></o:p>
<p class=MsoList style='margin-left:.25in;text-indent:0in;mso-list:none;
tab-stops:.5in'><span style='mso-bookmark:_Ref89954138'>You can override this
formatted System Prompt to get any arbitrary results you want by using the
prefix: &#8220;UseSystemPrompt<span class=GramE>: &#8221;</span></span></p>
prefix: &#8220;UseSystemPrompt: &#8221;</span></p>

<p class=MsoList style='margin-left:.25in;text-indent:0in;mso-list:none;
tab-stops:.5in'><span style='mso-bookmark:_Ref89954138'>For example, to see if it
meets the needs of your application, you could start with the simple System
tab-stops:.5in'><span style='mso-bookmark:_Ref89954138'>For example, to see if
it meets the needs of your application, you could start with the simple System
Prompt:</span></p>

<p class=MsoList style='margin-left:.25in;text-indent:0in;mso-list:none;
Expand All @@ -1889,8 +1885,8 @@ <h3><span style='mso-fareast-font-family:"Times New Roman"'>Setup Tab<o:p></o:p>

<p class=MsoList style='margin-left:.25in;text-indent:0in;mso-list:none;
tab-stops:.5in'><span style='mso-bookmark:_Ref89954138'>Note that if you begin
this field with the string, &#8220;UseSystemPrompt<span class=GramE>: &#8221;</span>,
then the Source and Target language boxes will be ignored. </span></p>
this field with the string, &#8220;UseSystemPrompt: &#8221;, then the Source
and Target language boxes will be ignored. </span></p>

<p class=MsoList style='margin-left:.25in;text-indent:0in;mso-list:none;
tab-stops:.5in'><span style='mso-bookmark:_Ref89954138'>Finally, you should
Expand Down Expand Up @@ -2016,8 +2012,8 @@ <h4><a name="_Saving_the_converter_in_the_System_"></a><span style='mso-fareast-

<p class=MsoBodyText><o:p>&nbsp;</o:p></p>

<p class=MsoBodyText>From this credentials page, you can create a new credentials
(json) key that you will want to save in a safe place. </p>
<p class=MsoBodyText>From this credentials page, you can create a new
credentials (json) key that you will want to save in a safe place. </p>

<p class=MsoBodyText align=right style='text-align:right'><span
style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_4"
Expand All @@ -2037,31 +2033,34 @@ <h4><a name="_Saving_the_converter_in_the_System_"></a><span style='mso-fareast-

<p class=MsoBodyText><o:p>&nbsp;</o:p></p>

<h4><span style='mso-fareast-font-family:"Times New Roman"'>Using Environment
Variables to Store Google Cloud Credentials<o:p></o:p></span></h4>

<p class=MsoBodyText>Note that when the translator is used in different client
applications (e.g. <span class=MsoSubtleEmphasis>Paratext</span>, <span
class=MsoSubtleEmphasis>Word</span>, or the <span class=MsoSubtleEmphasis>Clipboard
EncConverter</span>), the settings (including the credentials json message mentioned
above) are stored (encrypted) in the application settings file of the specific
application using it. <span class=GramE>So</span> you may be asked to enter it in
each application that you want to use it in. Alternately, you can add the path
to the downloaded json file to the following environment variable (<span
EncConverter</span>), the settings (including the credentials json message
mentioned above) are stored (encrypted) in the application settings file of the
specific application using it. So you may be asked to enter it in each
application that you want to use it in. Alternately, you can add the path to
the downloaded json file to the following environment variable (<span
class=MsoIntenseEmphasis>GOOGLE_APPLICATION_CREDENTIALS</span>), and it will be
available to all applications:<o:p></o:p></p>
available to all applications:</p>

<p class=MsoBodyText align=right style='text-align:right'><span
style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75"
style='width:347.25pt;height:70.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="Vertex_AI_Translate_Plug-in_About_box_files/image006.jpg"
o:title=""/>
</v:shape><![endif]--><![if !vml]><img border=0 width=463 height=94
src="Vertex_AI_Translate_Plug-in_About_box_files/image006.jpg" v:shapes="_x0000_i1027"><![endif]></span><o:p></o:p></p>
src="Vertex_AI_Translate_Plug-in_About_box_files/image006.jpg" v:shapes="_x0000_i1027"><![endif]></span></p>

<p class=MsoCaption align=right style='text-align:right'>Figure <!--[if supportFields]><span
style='mso-element:field-begin'></span><span
style='mso-spacerun:yes'>&nbsp;</span>SEQ Figure \* ARABIC <span
style='mso-element:field-separator'></span><![endif]--><span style='mso-no-proof:
yes'>5</span><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]-->:
Environment Variable for Google Credentials<o:p></o:p></p>
Environment Variable for Google Cloud Credentials</p>

<p class=MsoBodyText><o:p>&nbsp;</o:p></p>

Expand Down Expand Up @@ -2095,8 +2094,8 @@ <h4><span style='mso-fareast-font-family:"Times New Roman"'>Saving the

<p class=imageright><o:p>&nbsp;</o:p></p>

<p class=MsoBodyText>The <b>Advanced Tab</b> can be used to enter further,
optional information about this converter, which is also put into the <span
<p class=MsoBodyText>The <b>Advanced Tab</b> can be used to enter further, optional
information about this converter, which is also put into the <span
class=definedword>System Repository</span> and can be used by various client
applications. Click on this tab to display the following dialog box:</p>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions src/EcTranslators/VertexAi/QueryForGoogleCredentials.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8297090

Please sign in to comment.