Skip to content

Add ChatOptions support to ChatAgentConfig#6

Open
OnurGumus wants to merge 1 commit intoJordanMarr:mainfrom
OnurGumus:feature/chat-options
Open

Add ChatOptions support to ChatAgentConfig#6
OnurGumus wants to merge 1 commit intoJordanMarr:mainfrom
OnurGumus:feature/chat-options

Conversation

@OnurGumus
Copy link
Contributor

Summary

  • Adds ChatOptions field to ChatAgentConfig and ChatAgent.withChatOptions pipeline function
  • Wraps IChatClient with a delegating client that merges default ChatOptions (temperature, top-p, model, etc.) into every call
  • Per-call options from MAF override the defaults where present

Motivation

ChatClientAgent's constructor doesn't accept both instructions/tools and ChatOptions. This provides a clean way to set options like temperature at the agent config level.

Usage

ChatAgent.create instructions
|> ChatAgent.withChatOptions (ChatOptions(Temperature = 0.0f))
|> ChatAgent.withTools tools
|> ChatAgent.build chatClient

ChatClientAgent's constructor doesn't accept both instructions/tools
and ChatOptions, so this wraps the IChatClient with a delegating
client that merges default ChatOptions into every call. Per-call
options from MAF override the defaults where present.
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.

1 participant