googleapis / googleapis/nodejs-agentplatform
Support Fine Tuned Models from Vertex AI
- Dominant language
- TypeScript
- Stars
- 182
- Forks
- 69
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
Vertex AI supports custom models by fine tuning PaLM2 and the Python library has support for accessing these custom models like below:
```python
import vertexai
from vertexai.language_models import TextGenerationModel
vertexai.init(project="1032674713011", location="us-central1")
parameters = {
"candidate_count": 1,
"max_output_tokens": 1024,
"temperature": 0.9,
"top_p": 1
}
model = TextGenerationModel.from_pretrained("text-bison@002")
model = model.get_tuned_model("projects/1032674713011/locations/us-central1/models/8723892491658461184")
response = model.predict(
"""asdfasdf""",
**parameters
)
print(f"Response from Model: {response.text}")
```
Request:
Extend the nodejs library so it has the ability to call fine tuned models.
Contributor guide
Assessment
This issue has not been assessed yet.