Skip to content

Cache embeddings and completions. (Sourcery refactored)#18

Open
sourcery-ai[bot] wants to merge 1 commit into
cache-prompt-completionsfrom
sourcery/cache-prompt-completions
Open

Cache embeddings and completions. (Sourcery refactored)#18
sourcery-ai[bot] wants to merge 1 commit into
cache-prompt-completionsfrom
sourcery/cache-prompt-completions

Conversation

@sourcery-ai

@sourcery-ai sourcery-ai Bot commented May 2, 2023

Copy link
Copy Markdown

Pull Request #17 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the cache-prompt-completions branch, then run:

git fetch origin sourcery/cache-prompt-completions
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai
sourcery-ai Bot requested a review from BillSchumacher May 2, 2023 07:13
Comment thread athena/input_processor.py
Comment on lines +103 to +114
elif completion_callback == fastchat_chat_completion:
logger.debug(
"No intent was detected. Using fast-chat to generate a response."
)
response = completion_callback(
"fastchat-t5-3b-v1.0", prompt, temperature=0.8, max_tokens=512
)
else:
if completion_callback == fastchat_chat_completion:
logger.debug(
"No intent was detected. Using fast-chat to generate a response."
)
response = completion_callback(
"fastchat-t5-3b-v1.0", prompt, temperature=0.8, max_tokens=512
)
else:
logger.debug(
"No intent was detected. Using GPT-3 to generate a response."
)
response = completion_callback(prompt)
logger.debug(
"No intent was detected. Using GPT-3 to generate a response."
)
response = completion_callback(prompt)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function process_input refactored with the following changes:

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.

0 participants