Skip to content

Commit b484e05

Browse files
authored
Merge branch 'main' into bc/local-instance
2 parents 5a89417 + 51b13e2 commit b484e05

File tree

10 files changed

+93
-38
lines changed

10 files changed

+93
-38
lines changed

.github/workflows/stylecheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
id: stylecheck
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.STYLECHECK }}
36-
LLM_JWT: ${{ secrets.LLM_JWT }}
36+
LLM_TOKEN: ${{ secrets.LLM_TOKEN }}
3737
REPO_OWNER: ${{ github.repository_owner }}
3838
REPO_NAME: ${{ github.event.repository.name }}
3939
PR_NUMBER: ${{ github.event.pull_request.number }}
Loading
8.7 KB
Loading

fern/docs/pages/customization.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ _issue_ would have all _issue_ fields plus _bug_-specific fields like _RCA_.
4747

4848
Subtypes are defined using a schema fragment of type `custom_type_fragment`.
4949

50-
## Customizing a DevRev object
50+
## Customize a DevRev object
5151
<Callout intent="note">
5252
Your team needs to track software bugs. You want to know:
5353
- Which environments are affected (development, testing, production)
@@ -388,7 +388,7 @@ The object now references the latest fragment version (`custom_type_fragment/2`)
388388
the optional release notes field is absent, the tenant fragment remains attached,
389389
allowing for future tenant-specific field additions.
390390

391-
## Deprecating a custom schema fragment
391+
## Deprecate a custom schema fragment
392392

393393
Custom schema fragments can be deprecated to avoid creating work items using them. The
394394
following POST request payload to `schemas.custom.set` can be used:
@@ -406,7 +406,7 @@ following POST request payload to `schemas.custom.set` can be used:
406406
}
407407
```
408408

409-
## Listing custom schema fragments
409+
## List custom schema fragments
410410

411411
The following API call can be used to list all the custom schema fragments in your
412412
organization:
@@ -431,10 +431,16 @@ hints:
431431
* `is_sortable`: Whether the field is sortable. Requires `is_filterable` to be true.
432432
* `is_groupable`: Whether the field is groupable. Requires `is_filterable` to be true.
433433
* `order`: The order in which the field appears in the side panel.
434+
* `is_read_only`: Whether the field is read-only in the UI. Once the object is created, this
435+
field cannot be updated in the UI.
434436
* `group_name`: The group title under which field(s) appear in the side panel. In the
435437
example below, the fields are grouped under groups titled **Group 1** and **Group 2**.
436438

437439
![customization-group_name-ui-hint](../img/customization-group_name-ui-hint.png)
440+
* `unit`: The unit for the field. For example, days, kg. The unit is displayed
441+
in the side panel as shown below:
442+
443+
![customization-unit-ui-hint](../img/customization-unit-ui-hint.png)
438444

439445
<Callout intent="tip">
440446
`is_filterable` is not a UI hint but a top level field property.
@@ -535,7 +541,7 @@ and _closed_ states in your organization.
535541
You want to add a new stage _Needs RCA_ to the _bug_ subtype.
536542
</Callout>
537543

538-
### Adding a custom stage
544+
### Add a custom stage
539545

540546
```curl
541547
curl --location 'https://api.devrev.ai/stages.custom.create' \
@@ -622,7 +628,7 @@ curl --location 'https://api.devrev.ai/stage-diagrams.create' \
622628
It is important to specify the start stage for the diagram. This is the default stage that gets assigned to the newly created objects.
623629
</Callout>
624630

625-
### Using a stage diagram
631+
### Apply a stage diagram
626632

627633
The stage diagram created above can be referenced in the _bug_ subtype as follows:
628634

llm_client.py

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,34 @@ def get_response(prompt):
2121
r = requests.post('https://openwebui.dev.devrev-eng.ai/api/chat/completions', json=payload,
2222
headers=headers)
2323
r.raise_for_status()
24-
print(r)
2524

2625
if not r.text:
2726
raise ValueError("Empty response received from API")
28-
else:
29-
response = r.json()
30-
31-
if not response.get('choices'):
27+
json_response = r.json()
28+
if not json_response.get('choices'):
3229
raise ValueError("No 'choices' field in response")
33-
if not response['choices'][0].get('message'):
30+
if not json_response['choices'][0].get('message'):
3431
raise ValueError("No 'message' field in response")
35-
if not response['choices'][0]['message'].get('content'):
32+
if not json_response['choices'][0]['message'].get('content'):
3633
raise ValueError("No 'content' field in response")
37-
else:
38-
response = response['choices'][0]['message']['content']
3934

35+
response = json_response['choices'][0]['message']['content']
36+
37+
# Check if final response is empty
4038
if not response:
41-
raise ValueError("Empty content received from LLM.")
42-
else:
43-
print("Response received from LLM.")
44-
return response
39+
raise ValueError("Empty content received from API")
40+
41+
return response
4542

4643
except requests.RequestException as e:
47-
msg = f"HTTP request failed. Error: {type(e)} {e}"
48-
print(msg)
49-
return msg
44+
print(f"HTTP request failed. Error: {type(e)} {e}")
45+
return None
5046
except ValueError as e:
51-
msg = f"Invalid response received. Error: {e}"
52-
print(msg)
53-
return msg
47+
print(f"Invalid response received. Error: {e}")
48+
return None
5449
except Exception as e:
55-
msg = f"Failed to generate response. Error: {type(e)} {e}"
56-
print(msg)
57-
return msg
50+
print(f"Failed to generate response. Error: {type(e)} {e}")
51+
return None
5852

5953
def get_lines_between_tags(text, tag):
6054
pattern = r'<' + tag + r'>(.*?)<\/' + tag + r'>'

style/prompt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
You are an expert technical documentation editor. Analyze the included document and revise it so that it adheres to the following style rules. While you can make suggestions for being more concise, be very careful not to remove any facts from the document. Also do not change the document structure, including removing the title or headings, unless the original structure violates any of the guidelines. Also check the terminology given in CSV format inside the `<terminology>` element.
1+
You are an expert technical documentation editor. Analyze the included document and revise it so that it adheres to the following style rules. While you can make suggestions for being more concise, be very careful not to remove any facts from the document. In general, make the minimum number of changes necessary to ensure that the document adheres to the guidelines. Avoid changing the document structure, including removing the title or headings, unless the original structure violates any of the guidelines. Also check the terminology given in CSV format inside the `<terminology>` element.
22

3-
In your response, summarize the violations that you fixed. Return the revised markdown inside a separate element `<document>` element, just like in this request, that contains only the document and no other commentary. I’m going to read your suggestions through an API and need to be able to get just the document for the next stage.
3+
In your response, summarize the fixes you made. Return the revised markdown inside a separate `<document>` element, just like in this request, that contains only the document and no other commentary. I’m going to read your suggestions through an API and need to be able to get just the document for the next stage.

style/sample-marketplace.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Auto Parts to Conversation
2+
3+
<img src="https://devrev.ai/marketplace/api/item-artifact/don%3Acore%3Advrv-us-1%3Adevo%2F0%3Aartifact%2F7398" align="center"/>
4+
5+
## Overview
6+
7+
The Auto Part to Conversation snap-in is a powerful tool that utilizes advanced natural language processing (NLP) capabilities to analyze customer conversations. It aims to automatically identify the specific parts discussed in a conversation, providing valuable insights for enhanced customer service.
8+
9+
## How it Works
10+
11+
Once you install the snap-in, it does the following:
12+
13+
1. Resolution assignment: When the conversation is resolved, the snap-in will automatically analyze customer conversations and identify the relevant parts being discussed. It will assign the appropriate part to the conversation based on its analysis.
14+
15+
2. No part assignment when uncertain: In cases where the snap-in is unable to confidently identify a part, it will refrain from assigning any part to the conversation, ensuring accuracy.
16+
17+
## Features
18+
19+
**Automatic part assignment**
20+
21+
The Auto Part to Conversation snap-in eliminates the need for manual intervention by automatically assigning the relevant part to a conversation.
22+
23+
**Channel compatibility**
24+
25+
It seamlessly works across various communication channels, including email, PLuG, and Slack, providing consistent functionality and efficiency.
26+
27+
**High accuracy**
28+
29+
The snap-in ensures high accuracy by assigning a part only when it has a high level of confidence, minimizing the possibility of errors.
30+
31+
## Installation
32+
33+
To enable the auto part to conversation snap-in, click the Install button and follow the installation steps.

style/style-common.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,33 @@ For the writing style, apply the following descriptive keywords to revising the
77
- Vocabulary choice: consistent, technical
88
- Grammar and syntax: structured, flawless, articulate
99
- Descriptive language: clear, concise, informative
10-
- Language variant: standard technical/professional US American English; not British, Indian, or other variants.
10+
- Language variant: standard technical/professional US American English; not British, Indian, or other variants
11+
- Prohibited: profanity, hate speech, non-inclusive words, or any other unprofessional expressions
1112

1213
There are also some very specific style rules that need to be followed:
1314

15+
- Avoid future tense when describing the behavior of the product. Use simple present instead.
16+
- Do not make any reference to how things used to be ("currently", "new") or to future plans.
17+
18+
### Titles
19+
20+
- Do not use w-words (what, why, how) in headings or titles.
21+
- Avoid starting titles with verbs except for instructions as described below.
22+
- Titles of instructions or how-to guides should be a verb in the infinitive form without “to”, not a gerund (ending in -ing). Titles of any other type of section should be noun phrases.
1423
- Use sentence case (only capitalize the first word and proper nouns) in any type of heading, including in two-level lists.
24+
25+
### Instructions or how-to guides
26+
27+
- They may use two levels; both should be ordered (numbered) lists, not unordered (bulleted) lists.
28+
- Instructions should be in imperative mood.
29+
- If there is a location or condition in a step, it should be at the front of the main clause, which must still be in imperative mood.
30+
- Steps should be more than a single "click"; combine steps if needed to make them more meaningful. If there is an outcome of the step stated, it should be part of the same step, not a new step.
31+
32+
### Lists
33+
1534
- Ensure that any list is in parallel structure (use the same syntax for every entry).
16-
- Instructions or how-to guides:
17-
- They may use two levels; both should be ordered (numbered) lists, not unordered (bulleted) lists.
18-
- Instructions should be in imperative mood.
19-
- If there is a location or condition in a step, it should be at the front of the main clause, which must still be in imperative mood.
20-
- Steps should be more than a single "click"; combine steps if needed to make them more meaningful. If there is an outcome of the step stated, it should be part of the same step, not a new step.
2135
- End each list item with a period or other appropriate sentence-ending punctuation, except in the following cases:
2236
- If the item consists of a single word, don't add end punctuation.
2337
- If the item doesn't include a verb, don't add end punctuation.
2438
- If the item is entirely in code font, don't add end punctuation.
2539
- If the item is entirely link text or a document title, don't add end punctuation.
26-
- Titles of instructions or how-to guides should be a verb in the infinitive form without “to”, not a gerund (ending in -ing). Titles of any other type of section should be noun phrases.
27-
- Avoid future tense when describing the behavior of the product. Use simple present instead.

style/style-marketplace.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Marketplace-specific style
2+
3+
### Document structure
4+
5+
- Start with a paragraph, not a title or heading.
6+
- The first section should be an H2 titled "Features" containing a bulleted list of the snap-in features.
7+
- The second section should be an H2 titled "Installation" containing a numbered list of the installation instructions.
8+
- The third section should be an H2 titled "Configuration" containing a numbered list of the configuration instructions.
9+
- No other sections are allowed.

style/term-common.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Deprecated;Approved
22
foo;example
33
Devrev;DevRev
4+
navigate to;go to
45
RevOrg;workspace
56
RevUser;customer
67
snapin;snap-in

0 commit comments

Comments
 (0)