Closed markwylde closed 2 months ago
Am I right in thinking this should automatically work?
const c = Chat.with('ollama');
const messages = await c.chat('What is a rickroll?');
This looks great! Thank you for the contribution-in-progress.
Am I right in thinking this should automatically work?
const c = Chat.with('ollama'); const messages = await c.chat('What is a rickroll?');
Great question. No, we don't support introspection of that kind automatically (although maybe we should, eventually? might be a way to do it if you extend an abstract class.... hmm.)
I would expose the config options you want to expose inside Chat.ts
// Chat.ts
// add the new overload
static with(provider: "ollama", config: any): Chat;
// a few lines below, add your case statement
case "ollama":
adapter = provideOllamaChatAdapter({ config });
break;
And then you can add a simple test to ensure it instantiates, in Chat.test.ts
// Chat.test.ts
it('can instantiate ollama', () => {
const c = Chat.with('ollama', {
// ...
});
})
Sent you an email to the same effect, but thought I should also leave a message here: Please let me know if you need help. This is such great work :-)
Ahh nice one @monarchwadia. I'll get that added to the config today.
Thanks for the great work, @markwylde ! I've merged into dev branch, will check out the issue above & merge + push soon
This is my initial attempt at implementing the Ollama adapter.
Example usage: