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

Add chat_llm implementation for GPT model #807

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Conversation

arthurscchan
Copy link
Collaborator

This PR follows #800 by adding chat_llm implementation for GPT models.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan
Copy link
Collaborator Author

/gcbrun exp -n ascc-pr-807-1 -m vertex_ai_gemini-1-5 -i -b comparison

@arthurscchan arthurscchan marked this pull request as ready for review February 20, 2025 11:05
@DavidKorczynski DavidKorczynski merged commit 6c1e6fa into main Feb 26, 2025
6 checks passed
@DavidKorczynski DavidKorczynski deleted the add-chat-llm-for-gpt branch February 26, 2025 14:02
@maoyixie
Copy link
Collaborator

maoyixie commented Mar 13, 2025

It seems that the implementation did not maintain a chat session. Its function is the same as ask_llm(). The original intention of the chat_llm() is to query the LLM in the given chat session and returns the response.

@maoyixie maoyixie requested a review from DonggeLiu March 13, 2025 02:08
@maoyixie
Copy link
Collaborator

I will update this part at #814

@DonggeLiu
Copy link
Collaborator

DonggeLiu commented Mar 13, 2025

Thank you both for working on this.
@arthurscchan could you please help us double-check if LLM maintained a chat session in your location experiments?
LLM agents can perform much better in this way.

@maoyixie Do you happen to have the link to the corresponding OpenAI doc in hand? We will appreciate it if you could share it here : )

@maoyixie
Copy link
Collaborator

Thank you both for working on this. @arthurscchan could you please help us double-check if LLM maintained a chat session in your location experiments? LLM agents can perform much better in this way.

@maoyixie Do you happen to have the link to the corresponding OpenAI doc in hand? We will appreciate it if you could share it here : )

According to OpenAI Developer Community, to maintain a chat session with OpenAI GPT, you need to pass the entire conversation history, including previous prompts and responses, in each subsequent API call. This allows the model to retain context and remember the flow of the conversation.
Relevant links:
1.https://community.openai.com/t/how-to-preserve-the-context-session-of-a-conversation-with-the-api/324986
2.https://community.openai.com/t/how-can-i-maintain-conversation-continuity-with-chat-gpt-api/574819

@DavidKorczynski
Copy link
Collaborator

@arthurscchan could you take a look at the above comments?

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

4 participants