Skip to content

Commit cc85450

Browse files
authored
fix: change default port to 5701, adapt to new 5700 gptme-server default (#38)
* fix: change default port to 5701 * fix: adapt to new gptme-server default port 5700
1 parent 976a1bd commit cc85450

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/components/ConnectionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const ConnectionButton: FC = () => {
103103
id="url"
104104
value={formState.baseUrl}
105105
onChange={(e) => setFormState((prev) => ({ ...prev, baseUrl: e.target.value }))}
106-
placeholder="http://127.0.0.1:5000"
106+
placeholder="http://127.0.0.1:5700"
107107
/>
108108
</div>
109109

src/components/__tests__/ChatMessage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { observable } from '@legendapp/state';
77
// Mock the ApiContext
88
jest.mock('@/contexts/ApiContext', () => ({
99
useApi: () => ({
10-
baseUrl: 'http://localhost:5000',
10+
baseUrl: 'http://localhost:5700',
1111
}),
1212
}));
1313

src/contexts/ApiContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function ApiProvider({
6666

6767
return {
6868
baseUrl:
69-
fragmentBaseUrl || storedBaseUrl || import.meta.env.VITE_API_URL || 'http://127.0.0.1:5000',
69+
fragmentBaseUrl || storedBaseUrl || import.meta.env.VITE_API_URL || 'http://127.0.0.1:5700',
7070
authToken: fragmentUserToken || storedUserToken || null,
7171
useAuthToken: Boolean(fragmentUserToken || storedUserToken),
7272
};

src/democonversations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const demoConversations: DemoConversation[] = [
143143
{
144144
role: 'assistant',
145145
content:
146-
"To use the gptme web UI, you'll need to run `gptme-server` locally first:\n\n```shell\ngptme-server --cors-origin='<origin>' # Replace <origin> with the web UI URL\n```\n\nThen you have two options for accessing the web UI:\n\n1. **Use the hosted version** at [chat.gptme.org](https://chat.gptme.org):\n - Use `--cors-origin='https://chat.gptme.org'` when starting the server\n - Click the 'Connect' button in the top-right corner\n - Enter the server URL (default: http://127.0.0.1:5000)\n\n2. **Run the web UI locally**:\n ```shell\n git clone https://github.com/gptme/gptme-webui\n cd gptme-webui\n npm install\n npm run dev\n ```\n Then:\n - Use `--cors-origin='http://localhost:8080'` when starting the server\n - Open http://localhost:8080 in your browser\n - Click 'Connect' and enter the server URL\n\nBoth options provide the same features, just choose what works best for you!",
146+
"To use the gptme web UI, you'll need to run `gptme-server` locally first:\n\n```shell\ngptme-server --cors-origin='<origin>' # Replace <origin> with the web UI URL\n```\n\nThen you have two options for accessing the web UI:\n\n1. **Use the hosted version** at [chat.gptme.org](https://chat.gptme.org):\n - Use `--cors-origin='https://chat.gptme.org'` when starting the server\n - Click the 'Connect' button in the top-right corner\n - Enter the server URL (default: http://127.0.0.1:5700)\n\n2. **Run the web UI locally**:\n ```shell\n git clone https://github.com/gptme/gptme-webui\n cd gptme-webui\n npm install\n npm run dev\n ```\n Then:\n - Use `--cors-origin='http://localhost:5701'` when starting the server\n - Open http://localhost:5701 in your browser\n - Click 'Connect' and enter the server URL\n\nBoth options provide the same features, just choose what works best for you!",
147147
timestamp: now.toISOString(),
148148
},
149149
],

src/utils/__tests__/markdownUtils.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ Thinking blocks are collapsible and help show my reasoning process
200200
</thinking>
201201
202202
You can try the web UI by:
203-
1. Starting a local gptme-server: \`gptme-server --cors-origin='http://localhost:8080'\`
203+
1. Starting a local gptme-server: \`gptme-server --cors-origin='http://localhost:5701'\`
204204
2. Running the web UI: \`npm run dev\`
205-
3. Opening http://localhost:5173 in your browser`;
205+
3. Opening http://localhost:5701 in your browser`;
206206

207207
const result = parseMarkdownContent(input);
208208

@@ -235,7 +235,7 @@ You can try the web UI by:
235235
expect(result).toContain('You can try the web UI by:');
236236
expect(result).toContain('<code>gptme-server --cors-origin=');
237237
expect(result).toContain('<code>npm run dev</code>');
238-
expect(result).toContain('http://localhost:5173');
238+
expect(result).toContain('http://localhost:5701');
239239

240240
// Check thinking block
241241
expect(result).toContain('<details type="thinking"><summary>💭 Thinking</summary>');

src/utils/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
} from '@/types/api';
77
import type { Message, ToolUse } from '@/types/conversation';
88

9-
const DEFAULT_API_URL = 'http://127.0.0.1:5000';
9+
const DEFAULT_API_URL = 'http://127.0.0.1:5700';
1010

1111
// Add DOM types
1212
type RequestInit = globalThis.RequestInit;

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig(({ mode }) => ({
1010
mode === 'development'
1111
? {
1212
host: '::',
13-
port: 8080,
13+
port: 5701,
1414
}
1515
: undefined,
1616
plugins: [react(), mode === 'development' && componentTagger()].filter(Boolean),

0 commit comments

Comments
 (0)