Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom summary prompt in env functionality #208

Closed
wants to merge 17 commits into from

Conversation

bricemacias
Copy link
Contributor

@bricemacias bricemacias commented Sep 28, 2023

Allows to put a custom summary prompt in a env variable.
I put it in a env variable because I find it more practical to change (and private if you want to push your config to your own GitHub) than putting it in config.yml.

Tested and working on Render

@danielchalef
Copy link
Member

Thanks for this. Given the length and potential complexity of prompts, I'd prefer to see custom prompts being implemented as templates loaded from the filesystem. Multiline environment variables are a challenge to maintain.

We probably want to set up a directory structure or some other means of organization that allows us to identify which extractor (or other tool) and model the prompt is intended to be used with.

Would you be open to implementing this alternate approach? Happy to jump onto to a call to discuss the design live if it would be helpful.

@bricemacias
Copy link
Contributor Author

Okay I put the prompts configuration directly in the config.yaml. This is the first time I write in go so please tell me if there are any changes to make to improve it

@danielchalef
Copy link
Member

Thanks, @bricemacias. It looks like the tests are failing as the config model is misnamed. Would you like to update the PR so that the tests pass?

You can run the build and test locally:

make

You'll need to have the database and NLP services running in order for the unit and integration tests to pass:

docker compose up db nlp

Brice Macias and others added 2 commits October 3, 2023 11:05
@bricemacias
Copy link
Contributor Author

bricemacias commented Oct 3, 2023

Sorry I had not tested it. I did the docker build and make commands, but I don't have an anthropic api key so my local anthropic tests are failing. The rest seem to pass locally now however.

I also made a deploy on render with a custom summary prompt (with openai) on the config asking to summarise in French and not in English just to test, and it's working

@danielchalef
Copy link
Member

Moved into #211 in order to run tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants