cequence-io / openai-scala-client

Scala client for OpenAI API
MIT License
191 stars 20 forks source link

Support tool messages in Anthropic #62

Open branislav-burdiliak opened 6 months ago

branislav-burdiliak commented 6 months ago

Extract OpenAIChatToolCompletionService trait providing just a single method -- createChatToolCompletion. Provide OpenAIAnthropicChatToolCompletionService.

Additionally, OpenAI tool choice is translated to Anthropic AI as an additional user message with encouragement to use the tool in question, namely: Use the $toolChoice tool in your response.