Skip to content

minor code fix #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ The [**AI Gateway**](https://portkey.wiki/gh-10) is designed for fast, reliable
# Run the gateway locally (needs Node.js and npm)
npx @portkey-ai/gateway
```
> The Gateway is running on `http://localhost:8787/v1`
>
> The Gateway Console is running on `http://localhost:8787/public/`

<sup>
Deployment guides:
Expand Down Expand Up @@ -103,6 +106,11 @@ client.chat.completions.create(
&nbsp; [More..](https://portkey.wiki/gh-26)
</sup>

On the Gateway Console (`http://localhost:8787/public/`) you can see all of your local logs in one place.

<img src="https://github.com/user-attachments/assets/362bc916-0fc9-43f1-a39e-4bd71aac4a3a" width="400" />


### 3. Routing & Guardrails
`Configs` in the LLM gateway allow you to create routing rules, add reliability and setup guardrails.
```python
Expand Down Expand Up @@ -158,7 +166,9 @@ The enterprise deployment architecture for supported platforms is available here

### AI Engineering Hours

Join weekly community calls every Friday (8 AM PT) to kickstart your AI Gateway implementation! [Calendar Link](https://portkey.wiki/gh-35)
Join weekly community calls every Friday (8 AM PT) to kickstart your AI Gateway implementation! [Happening every Friday](https://portkey.wiki/gh-35)

<a href="https://portkey.wiki/gh-35"><img width="500" src="https://github.com/user-attachments/assets/c2885699-f197-4289-b819-21eb839fbae1" /></a>

Minutes of Meetings [published here](https://portkey.wiki/gh-36).

Expand Down
6 changes: 3 additions & 3 deletions src/public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function getTestRequestCodeBlock(language, vars) {
})

<span class="hljs-comment">// Example: Send a chat completion request</span>
const response = <span class="hljs-keyword">await</span> portkey.chat.completion.<span class="hljs-title function_">create</span>({
const response = <span class="hljs-keyword">await</span> portkey.chat.completions.<span class="hljs-title function_">create</span>({
<span class="hljs-attr">messages</span>: [{ <span class="hljs-attr">role</span>: <span class="hljs-string">'user'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Hello, how are you?'</span> }],
<span class="hljs-attr">model</span>: <span class="hljs-string">"${modelMap[vars.provider] || ''}"</span>${vars.provider=="anthropic"?`,
<span class="hljs-attr">max_tokens</span>: <span class="hljs-number">40</span>`:''}
Expand All @@ -195,7 +195,7 @@ client = Portkey(
)

<span class="hljs-comment"># Example: Send a chat completion request</span>
response = client.chat.completion.create(
response = client.chat.completions.create(
messages=[{<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"Hello, how are you?"</span>}],
model=<span class="hljs-string">"${modelMap[vars.provider] || ''}"</span>
)
Expand Down Expand Up @@ -705,4 +705,4 @@ window.onload = function() {
// spread: 70,
// origin: { y: 0.6 }
// });
};
};
Loading