Skip to content

Implement generate function in ollama model provider #8073

@SasinduDilshara

Description

@SasinduDilshara

Current Limitation

The Ballerina np library will adhere into a Evaluator interface in following format

public type Prompt object {
   *object:RawTemplate;

   public string[] & readonly strings;
   public anydata[] insertions;
};

public type Generator distinct isolated object {
   public isolated function generate(
           Prompt prompt, typedesc<anydata> td) returns td|error;
};

So the ballerinax/ai.ollama module needs to implement this generate function

Suggested Improvement

So these changes should implement in ballerinax/ai.ollama module ModelProvider implementation.

Version

No response

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions