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

Self-hosted assistants not using system prompt #881

Closed
sixlive opened this issue Feb 27, 2024 · 7 comments · Fixed by #913
Closed

Self-hosted assistants not using system prompt #881

sixlive opened this issue Feb 27, 2024 · 7 comments · Fixed by #913
Assignees

Comments

@sixlive
Copy link

sixlive commented Feb 27, 2024

Description

It looks like after updating beyond e6addfc my self-hosted instance assistants no longer use their system prompt.

I'm going to continue to investigate but it would be awesome if someone with much more context than me sorted it out before I figure it out though ;)

@nsarrazin nsarrazin self-assigned this Feb 27, 2024
@sixlive
Copy link
Author

sixlive commented Feb 27, 2024

I'm pretty sure its #807, specifically

I refactored buildPrompt and broke it down into preprocessMessages (inject websearch results and images for

multimodal) and buildPrompt (turn an array of messages into a string prompt).

I moved the prompt building out of the inference-specific code and into the POST endpoint for new messages. (less code duplication)

@nsarrazin
Copy link
Collaborator

Taking a look at this now, can you tell me which endpoint type you're using ?

@sixlive
Copy link
Author

sixlive commented Feb 29, 2024

@nsarrazin Heres some screenshots.


Requests made when sending a chat to an assistant that contains a custom prompt (this does not work as expected)

CleanShot 2024-02-29 at 11 17 07

Question: who are you?
Answer: I am a language model AI assistant here to help you with any questions or tasks you may have. How can I assist you today?

and when creating the assistant

CleanShot 2024-02-29 at 11 19 07

Heres one from just using gpt-3.5-turbo with a custom system prompt (this works as expected)

CleanShot 2024-02-29 at 11 19 07

Question: who are you?
Answer: I am a Nova the optimal AI!


Both the gpt-3.5 model and the assistant have the same prompt configured and the assistant is using the same model.

@sixlive
Copy link
Author

sixlive commented Mar 6, 2024

Just wanted to bump this, eager to use the new features!

@nsarrazin
Copy link
Collaborator

I pushed a fix that should have fixed the issue! let me know if it's resolved for you, otherwise I can reopen the issue 😁

@sixlive
Copy link
Author

sixlive commented Mar 7, 2024

Awesome!! I'll test it out this morning. Appreciate you!!

@sixlive
Copy link
Author

sixlive commented Mar 7, 2024

Confirmed fixed!! Thank you so much!!!

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 a pull request may close this issue.

2 participants