Skip to content

Commit

Permalink
Fix URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Mar 11, 2024
1 parent e7368dc commit 0273915
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 5 deletions.
140 changes: 140 additions & 0 deletions langserve/chat_playground/dist/assets/index-9018861a.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion langserve/chat_playground/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" href="/____LANGSERVE_BASE_URL/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chat Playground</title>
<script type="module" crossorigin src="/____LANGSERVE_BASE_URL/assets/index-41d5e9fe.js"></script>
<script type="module" crossorigin src="/____LANGSERVE_BASE_URL/assets/index-9018861a.js"></script>
<link rel="stylesheet" href="/____LANGSERVE_BASE_URL/assets/index-b47ed17e.css">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions langserve/chat_playground/src/components/ShareDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function ShareDialog(props: { config: unknown; children: ReactNode }) {
// get base URL
const targetUrl = `${state.basePath}/c/${hash}`;

// .../c/[hash]/chat_playground
const playgroundUrl = `${targetUrl}/chat_playground`;
// .../c/[hash]/playground
const playgroundUrl = `${targetUrl}/playground`;

// cURL, JS: .../c/[hash]/invoke
// Python: .../c/[hash]
Expand Down
4 changes: 2 additions & 2 deletions langserve/chat_playground/src/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function getStateFromUrl(path: string) {
basePath = basePath.slice(0, -1);
}

if (basePath.endsWith("/chat_playground")) {
basePath = basePath.slice(0, -"/chat_playground".length);
if (basePath.endsWith("/playground")) {
basePath = basePath.slice(0, -"/playground".length);
}

// check if we can omit the last segment
Expand Down

0 comments on commit 0273915

Please sign in to comment.