You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/components/Json/Json.stories.tsx
+64Lines changed: 64 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,3 +71,67 @@ export const Objects: Story = {
71
71
},
72
72
render,
73
73
}
74
+
75
+
exportconstOpenAICompletions: Story={
76
+
args: {
77
+
json: {
78
+
model: 'gpt-4',
79
+
messages: [
80
+
{
81
+
role: 'system',
82
+
content: 'You are a helpful assistant that explains complex concepts clearly.',
83
+
},
84
+
{
85
+
role: 'user',
86
+
content: 'Can you explain how machine learning works?',
87
+
},
88
+
{
89
+
role: 'assistant',
90
+
content: 'Machine learning is a method of data analysis that automates analytical model building. It uses algorithms that iteratively learn from data, allowing computers to find hidden insights without being explicitly programmed where to look.',
91
+
},
92
+
{
93
+
role: 'user',
94
+
content: 'What are the main types of machine learning?',
95
+
},
96
+
],
97
+
temperature: 0.7,
98
+
max_tokens: 2048,
99
+
top_p: 1.0,
100
+
frequency_penalty: 0.0,
101
+
presence_penalty: 0.0,
102
+
},
103
+
},
104
+
render,
105
+
}
106
+
107
+
exportconstMessagesList: Story={
108
+
args: {
109
+
json: [
110
+
{
111
+
role: 'user',
112
+
content: 'Hello, how are you today?',
113
+
},
114
+
{
115
+
role: 'assistant',
116
+
content: 'I\'m doing well, thank you for asking! How can I help you today?',
117
+
},
118
+
{
119
+
role: 'user',
120
+
content: 'I need help with debugging a JavaScript function that\'s not working correctly.',
121
+
},
122
+
{
123
+
role: 'assistant',
124
+
content: 'I\'d be happy to help you debug your JavaScript function. Could you please share the code that\'s causing issues?',
125
+
},
126
+
{
127
+
role: 'user',
128
+
content: 'Sure, here it is: function calculate(a, b) { return a + b * c; }',
129
+
},
130
+
{
131
+
role: 'assistant',
132
+
content: 'I can see the issue! The variable `c` is not defined in your function. You\'re using `c` but it\'s not a parameter or declared variable. You probably want either `function calculate(a, b, c)` or just `return a + b` depending on your intended calculation.',
0 commit comments