Skip to content

Commit

Permalink
Fix error in translate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntu committed Apr 4, 2024
1 parent a93445b commit 015b561
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/translate-ai.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ <h2 id='9f45c649b7'>获取支持语言</h2>
<div class="highlight"><pre class="highlight shell tab-shell"><code>curl https://ai.pgpt.cloud/v1/language/ <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
<span class="nt">-H</span> <span class="s2">"Authorization: Bearer &lt;API_KEY&gt;"</span> <span class="se">\</span>
</code></pre></div><div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">import</span> <span class="nn">request</span>
</code></pre></div><div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">import</span> <span class="nn">requests</span>

<span class="n">HOST</span> <span class="o">=</span> <span class="s">'https://ai.pgpt.cloud/'</span>
<span class="n">HOST</span> <span class="o">=</span> <span class="s">'https://ai.pgpt.cloud'</span>
<span class="n">API_KEY</span> <span class="o">=</span> <span class="s">'&lt;YOUR_API_KEY&gt;'</span>

<span class="n">header</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">headers</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"Content-Type"</span><span class="p">:</span> <span class="s">"application/json"</span><span class="p">,</span>
<span class="s">"Authorization"</span><span class="p">:</span> <span class="sa">f</span><span class="s">"Bearer </span><span class="si">{</span><span class="n">API_KEY</span><span class="si">}</span><span class="s">"</span><span class="p">,</span>
<span class="p">}</span>
Expand Down
6 changes: 3 additions & 3 deletions source/translate-ai.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ curl https://ai.pgpt.cloud/v1/language/ \
```

```python
import request
import requests

HOST = 'https://ai.pgpt.cloud/'
HOST = 'https://ai.pgpt.cloud'
API_KEY = '<YOUR_API_KEY>'

header = {
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {API_KEY}",
}
Expand Down

0 comments on commit 015b561

Please sign in to comment.