Skip to content

Commit 534d757

Browse files
authored
small improvements for langchain (#173)
1 parent 27c228c commit 534d757

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.grit/patterns/openai_v4.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ pattern change_constructor() {
2121
$program <: contains or {
2222
`const $config = new Configuration($details)`,
2323
`let $config = new Configuration($details)`,
24-
`var $config = new Configuration($details)`
24+
`var $config = new Configuration($details)`,
25+
`$config = new Configuration($details)`,
2526
} => .,
2627
}
2728
},
@@ -235,6 +236,10 @@ pattern fix_types() {
235236
`FineTuneEvent` => `OpenAI.FineTuneEvent`,
236237
`ImagesResponse` => `OpenAI.ImagesResponse`,
237238
`OpenAIFile` => `OpenAI.FileObject`,
239+
`ChatCompletionRequestMessageFunctionCall` => `OpenAI.Chat.ChatCompletionMessage.FunctionCall`,
240+
`ChatCompletionFunctions` => `OpenAI.Chat.CompletionCreateParams.Function`,
241+
`ConfigurationParameters` => `ClientOptions`,
242+
`OpenAIApi` => `OpenAI`,
238243
} as $thing where or {
239244
$thing <: imported_from(from=`"openai"`),
240245
$program <: contains `$old = require($from)` where {

0 commit comments

Comments
 (0)