Skip to content

Commit

Permalink
feat: Conversation option for prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Selman <danscode@selman.org>
  • Loading branch information
dselman committed Jun 28, 2024
1 parent 7906621 commit 91648e7
Show file tree
Hide file tree
Showing 26 changed files with 70 additions and 91 deletions.
18 changes: 6 additions & 12 deletions docs/classes/Conversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Creates a new Conversation

#### Source

[Conversation.ts:26](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/Conversation.ts#L26)
[Conversation.ts:26](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/Conversation.ts#L26)

## Properties

Expand Down Expand Up @@ -65,22 +65,16 @@ the final result message

#### Source

[Conversation.ts:81](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/Conversation.ts#L81)
[Conversation.ts:81](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/Conversation.ts#L81)

***

### getSystemMessage()

> **getSystemMessage**(`prompt`?): `object`
> **getSystemMessage**(): `object`
The system message

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `prompt`? | `string` |

#### Returns

`object`
Expand All @@ -97,7 +91,7 @@ the system message for the conversation
#### Source

[Conversation.ts:68](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/Conversation.ts#L68)
[Conversation.ts:68](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/Conversation.ts#L68)

***

Expand All @@ -116,7 +110,7 @@ or undefined if a user message has not been added

#### Source

[Conversation.ts:111](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/Conversation.ts#L111)
[Conversation.ts:111](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/Conversation.ts#L111)

***

Expand All @@ -142,4 +136,4 @@ all the messages

#### Source

[Conversation.ts:41](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/Conversation.ts#L41)
[Conversation.ts:41](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/Conversation.ts#L41)
56 changes: 28 additions & 28 deletions docs/classes/GraphModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Creates a new instance of GraphModel

#### Source

[graphmodel.ts:27](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L27)
[graphmodel.ts:27](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L27)

## Properties

Expand Down Expand Up @@ -65,7 +65,7 @@ the query results

#### Source

[graphmodel.ts:609](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L609)
[graphmodel.ts:609](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L609)

***

Expand All @@ -87,7 +87,7 @@ Closes a database context.

#### Source

[graphmodel.ts:167](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L167)
[graphmodel.ts:167](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L167)

***

Expand All @@ -103,7 +103,7 @@ Connects to Neo4J

#### Source

[graphmodel.ts:43](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L43)
[graphmodel.ts:43](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L43)

***

Expand All @@ -119,7 +119,7 @@ Create Neo4J constraints for the model

#### Source

[graphmodel.ts:301](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L301)
[graphmodel.ts:301](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L301)

***

Expand All @@ -135,7 +135,7 @@ Create fulltext indexes for the model

#### Source

[graphmodel.ts:373](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L373)
[graphmodel.ts:373](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L373)

***

Expand All @@ -152,7 +152,7 @@ for the model

#### Source

[graphmodel.ts:292](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L292)
[graphmodel.ts:292](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L292)

***

Expand All @@ -168,7 +168,7 @@ Create vector indexes for the model

#### Source

[graphmodel.ts:355](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L355)
[graphmodel.ts:355](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L355)

***

Expand All @@ -184,7 +184,7 @@ Delete all nodes/edges in the graph

#### Source

[graphmodel.ts:391](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L391)
[graphmodel.ts:391](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L391)

***

Expand All @@ -210,7 +210,7 @@ the result

#### Source

[graphmodel.ts:491](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L491)
[graphmodel.ts:491](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L491)

***

Expand All @@ -226,7 +226,7 @@ Drop all Neo4J indexes for the model.

#### Source

[graphmodel.ts:263](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L263)
[graphmodel.ts:263](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L263)

***

Expand All @@ -252,7 +252,7 @@ the items

#### Source

[graphmodel.ts:643](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L643)
[graphmodel.ts:643](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L643)

***

Expand All @@ -270,7 +270,7 @@ the concerto models as a string

#### Source

[graphmodel.ts:590](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L590)
[graphmodel.ts:590](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L590)

***

Expand All @@ -296,7 +296,7 @@ specified

#### Source

[graphmodel.ts:75](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L75)
[graphmodel.ts:75](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L75)

***

Expand All @@ -322,7 +322,7 @@ decorator

#### Source

[graphmodel.ts:338](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L338)
[graphmodel.ts:338](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L338)

***

Expand All @@ -343,7 +343,7 @@ graph nodes

#### Source

[graphmodel.ts:97](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L97)
[graphmodel.ts:97](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L97)

***

Expand All @@ -367,7 +367,7 @@ an array of OpenAI tool definitions

#### Source

[graphmodel.ts:771](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L771)
[graphmodel.ts:771](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L771)

***

Expand All @@ -393,7 +393,7 @@ decorator

#### Source

[graphmodel.ts:319](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L319)
[graphmodel.ts:319](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L319)

***

Expand All @@ -410,7 +410,7 @@ from the graph and populates the ModelManager

#### Source

[graphmodel.ts:150](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L150)
[graphmodel.ts:150](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L150)

***

Expand All @@ -428,7 +428,7 @@ promise to indicate the operation is complete

#### Source

[graphmodel.ts:117](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L117)
[graphmodel.ts:117](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L117)

***

Expand Down Expand Up @@ -457,7 +457,7 @@ the graph node

#### Source

[graphmodel.ts:468](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L468)
[graphmodel.ts:468](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L468)

***

Expand Down Expand Up @@ -486,7 +486,7 @@ the source node

#### Source

[graphmodel.ts:506](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L506)
[graphmodel.ts:506](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L506)

***

Expand All @@ -511,7 +511,7 @@ a promise to a Context for the database.

#### Source

[graphmodel.ts:59](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L59)
[graphmodel.ts:59](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L59)

***

Expand All @@ -537,7 +537,7 @@ the query results

#### Source

[graphmodel.ts:438](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L438)
[graphmodel.ts:438](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L438)

***

Expand All @@ -556,7 +556,7 @@ returns the concerto model from the graph

#### Source

[graphmodel.ts:132](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L132)
[graphmodel.ts:132](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L132)

***

Expand All @@ -583,7 +583,7 @@ an array of similar nodes, up to the count limit

#### Source

[graphmodel.ts:565](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L565)
[graphmodel.ts:565](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L565)

***

Expand All @@ -608,7 +608,7 @@ Performs a similarity search on nodes with text content

#### Source

[graphmodel.ts:407](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L407)
[graphmodel.ts:407](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L407)

***

Expand All @@ -632,4 +632,4 @@ the Cypher query

#### Source

[graphmodel.ts:599](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/graphmodel.ts#L599)
[graphmodel.ts:599](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/graphmodel.ts#L599)
4 changes: 2 additions & 2 deletions docs/classes/TextToGraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Creates a new TextToGraph

#### Source

[TextToGraph.ts:19](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/TextToGraph.ts#L19)
[TextToGraph.ts:19](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/TextToGraph.ts#L19)

## Properties

Expand Down Expand Up @@ -69,4 +69,4 @@ an object that describes which nodes and relationships were added
#### Source

[TextToGraph.ts:35](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/TextToGraph.ts#L35)
[TextToGraph.ts:36](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/TextToGraph.ts#L36)
2 changes: 1 addition & 1 deletion docs/functions/getOpenAiEmbedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ a promise to an array of numbers

## Source

[functions.ts:28](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/functions.ts#L28)
[functions.ts:28](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/functions.ts#L28)
2 changes: 1 addition & 1 deletion docs/type-aliases/Context.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Runtime context
## Source

[types.ts:140](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L140)
[types.ts:144](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L144)
8 changes: 7 additions & 1 deletion docs/type-aliases/ConversationOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ reached
Options to configure Open AI

### systemPrompt?

> `optional` **systemPrompt**: `string`
System prompt

### toolOptions

> **toolOptions**: [`ToolOptions`](ToolOptions.md)
Expand All @@ -40,4 +46,4 @@ Which tools to register on the conversation

## Source

[types.ts:84](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L84)
[types.ts:84](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L84)
2 changes: 1 addition & 1 deletion docs/type-aliases/EmbeddingCacheNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ A Node type that is used to cache vector embeddings
## Source

[types.ts:147](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L147)
[types.ts:151](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L151)
2 changes: 1 addition & 1 deletion docs/type-aliases/EmbeddingFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ vector embeddings for text

## Source

[types.ts:176](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L176)
[types.ts:180](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L180)
2 changes: 1 addition & 1 deletion docs/type-aliases/FullTextIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Definition of a full text index over some properties
## Source

[types.ts:131](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L131)
[types.ts:135](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L135)
2 changes: 1 addition & 1 deletion docs/type-aliases/GraphModelOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Options to configure Open AI
## Source

[types.ts:197](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L197)
[types.ts:201](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L201)
2 changes: 1 addition & 1 deletion docs/type-aliases/GraphNodeProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The properties allowed on graph nodes

## Source

[types.ts:170](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L170)
[types.ts:174](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L174)
2 changes: 1 addition & 1 deletion docs/type-aliases/Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ Function signature for a logger

## Source

[types.ts:181](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L181)
[types.ts:185](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L185)
2 changes: 1 addition & 1 deletion docs/type-aliases/OpenAiOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Tool choice

## Source

[types.ts:54](https://github.com/accordproject/lab-concerto-graph/blob/87c81018347fa08584f3cb9907a3e77815e8c62a/src/types.ts#L54)
[types.ts:54](https://github.com/accordproject/lab-concerto-graph/blob/7906621d6d0601d49217ffdd5ad64cfc20af0507/src/types.ts#L54)
Loading

0 comments on commit 91648e7

Please sign in to comment.