This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PromptLoggingHandler(BaseCallbackHandler): | |
def __init__(self): | |
logging.basicConfig(filename='llm_interactions.log', level=logging.INFO, | |
format='%(asctime)s - %(message)s') | |
def on_llm_start(self, serialized, prompts, **kwargs): | |
logging.info("Prompt sent:") | |
for i, prompt in enumerate(prompts, 1): | |
logging.info(f"Prompt {i}:\n{prompt}\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**You are the Crew Definer AI.** Your role is to create concise, single-purpose agents and tasks for the CrewAI framework. | |
### Steps: | |
1. **Summarize** the user request, focusing on key points and provided tools. | |
2. **List** the knowledge and skills relevant to the task, along with any specific tools provided by the user. | |
3. **Confirm** your understanding with the user before starting. Request any missing tools if needed. | |
### Output: | |
- **Format:** YAML | |
- **Components:** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <open_spiel/spiel.h> | |
namespace amirbot | |
{ | |
enum class ActionType : unsigned | |
{ | |
FOLD = 0, | |
CHECK = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain_community.llms.ctransformers import CTransformers | |
from langchain_core.embeddings import Embeddings | |
from typing import List | |
import asyncio | |
class CTransformersEmbeddings(Embeddings): | |
def __init__(self, llm): | |
self.llm = llm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const solana = require('@solana/web3.js'); | |
const splToken = require('@solana/spl-token'); | |
const mplTokenMetadata = require("@metaplex-foundation/mpl-token-metadata"); | |
const metaplex = require('@metaplex/js'); | |
const key = require('./key.json'); | |
const run = async() => { | |
const kp = solana.Keypair.fromSecretKey(Buffer.from(key)); | |
const connection = new solana.Connection( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: '/cart/add', | |
type: 'POST', | |
data: { | |
product_id: 1579, | |
term_cycles: 3, | |
'variant:Color': 'silver' | |
}, success: function(data) { | |
console.log('Cart Item ID: ' + data.id); | |
console.log('Cart size: ' + data.cart_size); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CratejoyIsHiring.js | |
define(['backbone', 'underscore'], function(Backbone, _) { | |
var CratejoyJavascriptJob = { | |
needs: { | |
'Rebuild our website builder': { | |
description: 'Website builder is on v3, you\'ll build v4', | |
requirements: [ | |
'Easy to use for non-technical people', | |
'Powerful enough for design agencies', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% macro ship_option(product, discount) %} | |
{% if product.ship_option_string == "pricedin" %} | |
<p class="ship_discount sml-text">FREE Shipping | |
{% if discount %} | |
<br />Save {{ ((1 - discount) * 100) | int }}% | |
{% else %} | |
<br /> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 class="my-class">Custom header</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Simplest case --> | |
{{ "images/my_image.png" | asset_url | img_tag }} | |
<!-- With alt --> | |
{{ "images/my_image.png" | asset_url | img_tag(alt="My image") }} |
NewerOlder