Skip to content

Commit

Permalink
feat: logging
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Selman <danscode@selman.org>
  • Loading branch information
dselman committed May 24, 2024
1 parent 8e78133 commit 7aaff8f
Show file tree
Hide file tree
Showing 25 changed files with 203 additions and 91 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

## Variables

- [ConsoleLogger](variables/ConsoleLogger.md)
- [EMBEDDINGS\_MAGIC](variables/EMBEDDINGS_MAGIC.md)

## Functions
Expand Down
4 changes: 2 additions & 2 deletions docs/classes/Conversation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Creates a new Conversation

#### Source

[Conversation.ts:22](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/Conversation.ts#L22)
[Conversation.ts:22](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/Conversation.ts#L22)

## Properties

Expand Down Expand Up @@ -63,4 +63,4 @@ the final result message

#### Source

[Conversation.ts:35](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/Conversation.ts#L35)
[Conversation.ts:35](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/Conversation.ts#L35)
40 changes: 20 additions & 20 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:24](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L24)
[graphmodel.ts:24](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L24)

## Properties

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

#### Source

[graphmodel.ts:459](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L459)
[graphmodel.ts:459](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L459)

***

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

#### Source

[graphmodel.ts:67](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L67)
[graphmodel.ts:67](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L67)

***

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

#### Source

[graphmodel.ts:38](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L38)
[graphmodel.ts:38](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L38)

***

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

#### Source

[graphmodel.ts:192](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L192)
[graphmodel.ts:192](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L192)

***

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

#### Source

[graphmodel.ts:232](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L232)
[graphmodel.ts:232](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L232)

***

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

#### Source

[graphmodel.ts:183](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L183)
[graphmodel.ts:183](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L183)

***

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

#### Source

[graphmodel.ts:209](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L209)
[graphmodel.ts:209](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L209)

***

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

#### Source

[graphmodel.ts:254](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L254)
[graphmodel.ts:254](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L254)

***

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

#### Source

[graphmodel.ts:351](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L351)
[graphmodel.ts:351](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L351)

***

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

#### Source

[graphmodel.ts:154](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L154)
[graphmodel.ts:154](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L154)

***

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

#### Source

[graphmodel.ts:491](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L491)
[graphmodel.ts:491](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L491)

***

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

#### Source

[graphmodel.ts:582](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L582)
[graphmodel.ts:582](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L582)

***

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

#### Source

[graphmodel.ts:328](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L328)
[graphmodel.ts:328](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L328)

***

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

#### Source

[graphmodel.ts:366](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L366)
[graphmodel.ts:366](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L366)

***

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

#### Source

[graphmodel.ts:55](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L55)
[graphmodel.ts:55](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L55)

***

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

#### Source

[graphmodel.ts:301](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L301)
[graphmodel.ts:301](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L301)

***

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

#### Source

[graphmodel.ts:425](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L425)
[graphmodel.ts:425](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L425)

***

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

#### Source

[graphmodel.ts:270](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L270)
[graphmodel.ts:270](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L270)

***

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

#### Source

[graphmodel.ts:448](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/graphmodel.ts#L448)
[graphmodel.ts:448](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/graphmodel.ts#L448)
2 changes: 1 addition & 1 deletion docs/functions/getOpenAiEmbedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ a promise to an array of numbers

## Source

[functions.ts:12](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/functions.ts#L12)
[functions.ts:12](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/functions.ts#L12)
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:30](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L30)
[types.ts:30](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L30)
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:37](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L37)
[types.ts:37](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L37)
2 changes: 1 addition & 1 deletion docs/type-aliases/EmbeddingFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ vector embeddings for text

## Source

[types.ts:66](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L66)
[types.ts:66](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L66)
2 changes: 1 addition & 1 deletion docs/type-aliases/FullTextIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Definition of a full text index over some properties
## Source

[types.ts:23](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L23)
[types.ts:23](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L23)
2 changes: 1 addition & 1 deletion docs/type-aliases/GraphModelOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Graph model options, used to configure Concerto Graph
## Source

[types.ts:78](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L78)
[types.ts:87](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L87)
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:60](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L60)
[types.ts:60](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L60)
67 changes: 64 additions & 3 deletions docs/type-aliases/Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,81 @@ Function signature for a logger

## Type declaration

### error()

> **error**: (`message`?, ...`optionalParams`) => `void`
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `message`? | `any` |
| ...`optionalParams`? | `any`[] |

#### Returns

`void`

### info()

> **info**: (`message`?, ...`optionalParams`) => `void`
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `message`? | `any` |
| ...`optionalParams`? | `any`[] |

#### Returns

`void`

### log()

> **log**: (`text`) => `void`
> **log**: (`message`?, ...`optionalParams`) => `void`
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `message`? | `any` |
| ...`optionalParams`? | `any`[] |

#### Returns

`void`

### success()

> **success**: (`message`?, ...`optionalParams`) => `void`
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `message`? | `any` |
| ...`optionalParams`? | `any`[] |

#### Returns

`void`

### warn()

> **warn**: (`message`?, ...`optionalParams`) => `void`
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `text` | `string` |
| `message`? | `any` |
| ...`optionalParams`? | `any`[] |

#### Returns

`void`

## Source

[types.ts:71](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L71)
[types.ts:71](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L71)
2 changes: 1 addition & 1 deletion docs/type-aliases/PropertyBag.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ A untyped set of properties

## Source

[types.ts:55](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L55)
[types.ts:55](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L55)
2 changes: 1 addition & 1 deletion docs/type-aliases/SimilarityResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Result of a vector similarity search
## Source

[types.ts:46](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L46)
[types.ts:46](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L46)
2 changes: 1 addition & 1 deletion docs/type-aliases/ToolResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ The string that we should compute embedding vectors for

## Source

[types.ts:90](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L90)
[types.ts:99](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L99)
2 changes: 1 addition & 1 deletion docs/type-aliases/VectorIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Definition of a vector (embeddings) index
## Source

[types.ts:14](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L14)
[types.ts:14](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L14)
13 changes: 13 additions & 0 deletions docs/variables/ConsoleLogger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[**@accordproject/concerto-graph**](../README.md)**Docs**

***

[@accordproject/concerto-graph](../README.md) / ConsoleLogger

# Variable: ConsoleLogger

> `const` **ConsoleLogger**: [`Logger`](../type-aliases/Logger.md)
## Source

[ConsoleLogger.ts:4](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/ConsoleLogger.ts#L4)
2 changes: 1 addition & 1 deletion docs/variables/EMBEDDINGS_MAGIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ that include semantic embeddings

## Source

[types.ts:9](https://github.com/accordproject/lab-concerto-graph/blob/479405ae077f731015a7cc00792f1e687d165a28/src/types.ts#L9)
[types.ts:9](https://github.com/accordproject/lab-concerto-graph/blob/8e78133b0c3a8cb9cb393d291d79fc66c6e6c373/src/types.ts#L9)
Loading

0 comments on commit 7aaff8f

Please sign in to comment.