ContextLab / ContextLab/chatify

Re-use chains

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
coding required
Dominant language
Python
Stars
23
Forks
11
PR merge metrics
No merged PRs in 30d

Description

# Overview

Instead of creating a new chain with each prompt, we should create the chain once (maybe when the chatify extension is first loaded?) and re-use it to respond to each query.

# Completion criteria

This requires refactoring [this function](https://github.com/ContextLab/chatify/blob/200e0a6dd1982ad241a59325db458aac3f0467d6/chatify/main.py#L141) and [this function](https://github.com/ContextLab/chatify/blob/200e0a6dd1982ad241a59325db458aac3f0467d6/chatify/main.py#L201)
- [ ] create a new chain when the extension is first loaded
- [ ] execute the chain when new queries are submitted

# Resources (optional)

Mentioned [here](https://github.com/ContextLab/chatify/blob/200e0a6dd1982ad241a59325db458aac3f0467d6/chatify/main.py#L156).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.