Skip to content

Commit

Permalink
cherry-pick (#794)
Browse files Browse the repository at this point in the history
* fix: create tag/edge statement with empty [NULL|NOT NULL] value (#762)

mod: version@3.9.1
(cherry picked from commit f48cef7)

* fix: resolves page crash issue during to many attribute editing on `/import/edit/${id}` page (#792)

docs: assistant
(cherry picked from commit 9c19645)

* fix: import template file (#793)

(cherry picked from commit 2db7ea2)
  • Loading branch information
huaxiabuluo authored Apr 23, 2024
1 parent 6cb77bf commit 9a8bf5a
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 171 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Use when you want shutdown the web app
kill -9 $(lsof -t -i :7001)
```

## Documentation 3.9.0
## Documentation 3.9.2
[中文](https://docs.nebula-graph.com.cn/3.6.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/)
[ENGLISH](https://docs.nebula-graph.io/3.6.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/)

Expand Down
3 changes: 2 additions & 1 deletion app/components/CSVPreviewLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const CSVPreviewLink = (props: IProps) => {
let data = [];
readString(sample, {
delimiter,
worker: true,
// @ts-ignore
worker: false,
skipEmptyLines: true,
step: (row) => {
data = [...data, row.data];
Expand Down
3 changes: 2 additions & 1 deletion app/components/FileConfigSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ const FileConfigSetting = (props: IProps) => {
if (activeItem.sample !== undefined) {
readString(activeItem.sample, {
delimiter: activeItem.delimiter || ',',
worker: true,
// @ts-ignore
worker: false,
skipEmptyLines: true,
step: (row) => {
content = [...content, row.data];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const PreviewFileModal = (props: IProps) => {
let data = [];
readString(sample, {
delimiter: delimiter || file.delimiter,
worker: true,
// @ts-ignore
worker: false,
skipEmptyLines: true,
step: (row) => {
data = [...data, row.data];
Expand Down
2 changes: 1 addition & 1 deletion app/pages/LLMBot/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Chat() {
const newMessages = [
...beforeMessages,
{ role: 'user', content: currentInput },
{ role: 'assistant', content: '', status: 'pending' }, // asistant can't be changed
{ role: 'assistant', content: '', status: 'pending' }, // assistant can't be changed
];
llm.update({
currentInput: '',
Expand Down
2 changes: 1 addition & 1 deletion app/pages/LLMBot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function LLMBot() {
content={<Chat />}
title={
<div className={styles.llmBotTitle}>
<div className={styles.llmBotTitleInner}>AI Asistant</div>
<div className={styles.llmBotTitleInner}>AI Assistant</div>
<div className={styles.llmBotHandler}>
text2match
<Switch
Expand Down
4 changes: 2 additions & 2 deletions app/stores/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as ngqlDoc from '@app/utils/ngql';
import schema from './schema';
import rootStore from '.';

export const matchPrompt = `I want you to be a NebulaGraph database asistant.
export const matchPrompt = `I want you to be a NebulaGraph database assistant.
There are below document.
----
Use only the provided relationship types and properties in the schema.
Expand Down Expand Up @@ -49,7 +49,7 @@ the reference documentation provided is: \n
----
Please marked(\`\`\`ngql) for markdown code block to write the ngql and answer the user's question with the question language`;

export const AgentTask = `Assume you are a NebulaGraph AI chat asistant. You need to help the user to write NGQL or solve other question.
export const AgentTask = `Assume you are a NebulaGraph AI chat assistant. You need to help the user to write NGQL or solve other question.
You have access to the following information:
1. The user's console NGQL context is: {current_ngql}
2. The user's current graph space is: {space_name}
Expand Down
6 changes: 4 additions & 2 deletions app/utils/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ export const getTagOrEdgeCreateGQL = (params: {
}
const _type =
item.type !== 'fixed_string' ? item.type : item.type + `(${item.fixedLength ? item.fixedLength : ''})`;
const _null = item.allowNull ? 'NULL' : 'NOT NULL';
// `[NULL | NOT NULL]` is not required
// in `CREATE TAG` or `CREATE EDGE` statement, the default value is `NULL` if not specified
const _null = item.allowNull === undefined ? '' : item.allowNull ? 'NULL' : 'NOT NULL';
const _comment = item.comment ? `COMMENT "${handleEscape(item.comment)}"` : '';
const conbine = [handleKeyword(item.name), _type, _null, valueStr, _comment];
const conbine = [handleKeyword(item.name), _type, _null, valueStr, _comment].filter(Boolean);
return conbine.join(' ');
})
.join(', ')
Expand Down
Loading

0 comments on commit 9a8bf5a

Please sign in to comment.