Skip to content

Instantly share code, notes, and snippets.

@YurkoHoshko
YurkoHoshko / ollama_example.livemd
Last active September 27, 2024 19:04
Gist to run simple Livebook-based app that allows one-shot prompting with Ollama. Enjoy :) https://x.com/DJTechDebt/status/1818205498384036019

One-shot prompt with Ollama

Mix.install(
  [:ollama, :kino]
)

Simple one-shot chat :)

{
{
:name => "root_category_1",
:id => "1",
:parent_category_id => nil,
:children =>
{
:name => "child_category_1",
:id => "2",
:parent_category_id => 1,
@YurkoHoshko
YurkoHoshko / sample_ajax
Last active August 29, 2015 14:14
Sample ajax call
json_data = {sample: parameter}
$.ajax({
type: 'GET',
url: '/example/url',
data: json_data,
dataType: 'json',
beforeSend: addCsrfToken,
success: function( data ) {
//Do something with data on success;