mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
update prompts and ollama endpoint
This commit is contained in:
@@ -1,50 +1,52 @@
|
|||||||
const a = {
|
const a = {
|
||||||
"Can you search for the latest quantum computing breakthroughs?":
|
"Can you search for the latest quantum computing breakthroughs?":
|
||||||
"I don't have web access.",
|
"I don't have web access.",
|
||||||
};
|
};
|
||||||
|
|
||||||
const b = {
|
const b = {
|
||||||
"Calculate the number of unique ways to arrange the letters in the word 'SUCCESS'.": `
|
"Calculate the number of unique ways to arrange the letters in the word SUCCESS.": `
|
||||||
Alright, let's tackle 'SUCCESS' and see just how unique it can get!
|
Alright, let's tackle 'SUCCESS' and see just how unique it can get!
|
||||||
1. Step 1: Count the Letters
|
### Step 1: Count the Letters
|
||||||
The word 'SUCCESS' has 7 letters, but it’s no free-for-all—there are repeats!
|
The word 'SUCCESS' has 7 letters, but it’s no free-for-all—there are repeats!
|
||||||
- S: 3 times
|
- S: 3 times
|
||||||
- U: 1 time
|
- U: 1 time
|
||||||
- C: 2 times
|
- C: 2 times
|
||||||
- E: 1 time
|
- E: 1 time
|
||||||
Erdős would call this a combinatorial party with some guests arriving multiple times.
|
### Step 2: The Formula for Permutations with Repetition
|
||||||
2. Step 2: The Formula for Permutations with Repetition
|
|
||||||
When letters repeat, we divide to avoid overcounting. The magic formula is:
|
When letters repeat, we divide to avoid overcounting. The magic formula is:
|
||||||
$$
|
$$
|
||||||
\frac{n!}{k_1! \cdot k_2! \cdot \ldots \cdot k_m!}
|
\frac{n!}{k_1! \cdot k_2! \cdot \ldots \cdot k_m!}
|
||||||
$$
|
$$
|
||||||
Here, (n) is the total number of letters, and (k_i) are the frequencies of each unique letter.
|
Here, (n) is the total number of letters, and (k_i) are the frequencies of each unique letter.
|
||||||
3. Step 3: Plug in the Values
|
### Step 3. Plug in the Values
|
||||||
Let’s compute:
|
Let’s compute:
|
||||||
$$
|
$$
|
||||||
\frac{7!}{3! \cdot 1! \cdot 2! \cdot 1!} = 420
|
\frac{7!}{3! \cdot 1! \cdot 2! \cdot 1!} = 420
|
||||||
$$
|
$$
|
||||||
|
|
||||||
4. Step 4: Reveal the Result
|
### Step 4: Reveal the Result
|
||||||
There are **420 unique arrangements** of 'SUCCESS'. Mathematically satisfying, isn’t it? It’s as if every version of success gets its own unique permutation!`,
|
There are 420 unique arrangements of 'SUCCESS'. Mathematically satisfying, isn’t it? It’s as if every version of success gets its own unique permutation!`,
|
||||||
"Calculate the number of unique ways to arrange the letters in the word 'MISSISSIPPI'.": `Ready for some permutation wizardry? Let’s decode 'MISSISSIPPI'!
|
|
||||||
1. Step 1: Count the Letters
|
|
||||||
|
"Calculate the number of unique ways to arrange the letters in the word MISSISSIPPI.":
|
||||||
|
`Ready for some permutation wizardry? Let’s decode 'MISSISSIPPI'!
|
||||||
|
### Step 1: Count the Letters
|
||||||
'MISSISSIPPI' has 11 letters. But like a social network with cliques, some letters appear in multiples:
|
'MISSISSIPPI' has 11 letters. But like a social network with cliques, some letters appear in multiples:
|
||||||
- M: 1
|
- M: 1
|
||||||
- I: 4
|
- I: 4
|
||||||
- S: 4
|
- S: 4
|
||||||
- P: 2
|
- P: 2
|
||||||
2. Step 2: Apply the Permutation Formula for Repetition
|
### Step 2: Apply the Permutation Formula for Repetition
|
||||||
The formula for such a case is:
|
The formula for such a case is:
|
||||||
$$
|
$$
|
||||||
\frac{n!}{k_1! \cdot k_2! \cdot \ldots \cdot k_m!}
|
\frac{n!}{k_1! \cdot k_2! \cdot \ldots \cdot k_m!}
|
||||||
$$
|
$$
|
||||||
3. Step 3: Plug in the Values
|
### Step 3: Plug in the Values
|
||||||
Here’s where we let the math do its magic:
|
Here’s where we let the math do its magic:
|
||||||
$$
|
$$
|
||||||
\frac{11!}{1! \cdot 4! \cdot 4! \cdot 2!}
|
\frac{11!}{1! \cdot 4! \cdot 4! \cdot 2!}
|
||||||
$$
|
$$
|
||||||
4. Step 4: Simplify Step-by-Step
|
### Step 4: Simplify Step-by-Step
|
||||||
Let’s break it down:
|
Let’s break it down:
|
||||||
- (11! = 39,916,800)
|
- (11! = 39,916,800)
|
||||||
- (4! = 24)
|
- (4! = 24)
|
||||||
@@ -53,19 +55,18 @@ Let’s break it down:
|
|||||||
$$
|
$$
|
||||||
\frac{39,916,800}{1 \cdot 24 \cdot 24 \cdot 2} = 34,650
|
\frac{39,916,800}{1 \cdot 24 \cdot 24 \cdot 2} = 34,650
|
||||||
$$
|
$$
|
||||||
5. Step 5: The Grand Finale
|
### Step 5: The Grand Finale
|
||||||
There are **34,650 unique arrangements** of 'MISSISSIPPI'. Erdős would marvel at the sheer elegance of these numbers—much like the way rivers meander through the land, permutations flow through possibilities.`,
|
There are 34,650 unique arrangements of 'MISSISSIPPI'.`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const c = {
|
const c = {
|
||||||
// c remains unchanged as it contains image generation prompts
|
// c remains unchanged as it contains image generation prompts
|
||||||
"Render a Greek statue with warm marble tones and realistic proportions.":
|
"Render a Greek statue with warm marble tones and realistic proportions.":
|
||||||
"I don't have the ability to generate images right now. ",
|
"I don't have the ability to generate images right now. ",
|
||||||
};
|
};
|
||||||
|
|
||||||
const d = {
|
const d = {
|
||||||
"Demonstrate all outputs.": `
|
"Demonstrate markdown formatted text.": `
|
||||||
# Comprehensive Markdown Showcase
|
|
||||||
## Headers
|
## Headers
|
||||||
~~~markdown
|
~~~markdown
|
||||||
# Large Header
|
# Large Header
|
||||||
@@ -73,80 +74,48 @@ const d = {
|
|||||||
### Small Header
|
### Small Header
|
||||||
~~~
|
~~~
|
||||||
## Ordered Lists
|
## Ordered Lists
|
||||||
~~~markdown
|
|
||||||
1. First Item
|
1. First Item
|
||||||
2. Second Item
|
2. Second Item
|
||||||
1. Subitem 1
|
1. Subitem 1
|
||||||
2. Subitem 2
|
2. Subitem 2
|
||||||
3. Third Item
|
3. Third Item
|
||||||
~~~
|
|
||||||
## Unordered Lists
|
## Unordered Lists
|
||||||
~~~markdown
|
|
||||||
- First Item
|
- First Item
|
||||||
- Second Item
|
- Second Item
|
||||||
- Subitem 1
|
- Subitem 1
|
||||||
- Subitem 2
|
- Subitem 2
|
||||||
~~~
|
|
||||||
## Links
|
## Links
|
||||||
~~~markdown
|
|
||||||
[Visit OpenAI](https://openai.com/)
|
[Visit OpenAI](https://openai.com/)
|
||||||
~~~
|
|
||||||
## Images
|
## Images
|
||||||
~~~markdown
|
|
||||||

|
|
||||||
~~~
|
|
||||||

|

|
||||||
## Inline Code
|
## Inline Code
|
||||||
~~~markdown
|
|
||||||
\`console.log('Hello, Markdown!')\`
|
\`console.log('Hello, Markdown!')\`
|
||||||
~~~
|
|
||||||
## Code Blocks
|
## Code Blocks
|
||||||
\`\`\`markdown
|
|
||||||
~~~javascript
|
~~~javascript
|
||||||
console.log(marked.parse('A Description List:\\n'
|
console.log(marked.parse('A Description List:\\n'
|
||||||
+ ': Topic 1 : Description 1\\n'
|
+ ': Topic 1 : Description 1\\n'
|
||||||
+ ': **Topic 2** : *Description 2*'));
|
+ ': **Topic 2** : *Description 2*'));
|
||||||
~~~
|
~~~
|
||||||
\`\`\`
|
|
||||||
## Tables
|
## Tables
|
||||||
~~~markdown
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
|---------|-------|
|
|---------|-------|
|
||||||
| Item A | 10 |
|
| Item A | 10 |
|
||||||
| Item B | 20 |
|
| Item B | 20 |
|
||||||
~~~
|
|
||||||
## Blockquotes
|
## Blockquotes
|
||||||
~~~markdown
|
|
||||||
> Markdown makes writing beautiful.
|
> Markdown makes writing beautiful.
|
||||||
> - Markdown Fan
|
> - Markdown Fan
|
||||||
~~~
|
|
||||||
## Horizontal Rule
|
## Horizontal Rule
|
||||||
~~~markdown
|
|
||||||
---
|
---
|
||||||
~~~
|
|
||||||
## Font: Bold and Italic
|
## Font: Bold and Italic
|
||||||
~~~markdown
|
|
||||||
**Bold Text**
|
**Bold Text**
|
||||||
*Italic Text*
|
*Italic Text*
|
||||||
~~~
|
|
||||||
## Font: Strikethrough
|
## Font: Strikethrough
|
||||||
~~~markdown
|
|
||||||
~~Struck-through text~~
|
~~Struck-through text~~
|
||||||
~~~
|
## Math
|
||||||
---
|
|
||||||
## Math: Inline
|
|
||||||
This is block level katex:
|
|
||||||
~~~markdown
|
~~~markdown
|
||||||
$$
|
$$
|
||||||
c = \\\\pm\\\\sqrt{a^2 + b^2}
|
c = \\\\pm\\\\sqrt{a^2 + b^2}
|
||||||
$$
|
$$`,
|
||||||
~~~
|
|
||||||
## Math: Block
|
|
||||||
This is inline katex
|
|
||||||
~~~markdown
|
|
||||||
$c = \\\\pm\\\\sqrt{a^2 + b^2}$
|
|
||||||
~~~
|
|
||||||
`,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default { a, b, c, d };
|
export default {a, b, c, d};
|
||||||
|
@@ -20,7 +20,7 @@ export class ProviderRepository {
|
|||||||
anthropic: 'https://api.anthropic.com/v1',
|
anthropic: 'https://api.anthropic.com/v1',
|
||||||
openai: 'https://api.openai.com/v1',
|
openai: 'https://api.openai.com/v1',
|
||||||
cerebras: 'https://api.cerebras.com/v1',
|
cerebras: 'https://api.cerebras.com/v1',
|
||||||
ollama: "http://localhost:11434",
|
ollama: "http://localhost:11434/v1",
|
||||||
mlx: "http://localhost:10240/v1",
|
mlx: "http://localhost:10240/v1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user