Telegram Group & Telegram Channel
👣 GoPilot

GoPilot — это библиотека для Go, которая позволяет вызывать ваши функции с помощью естественного языка.

⚡️ С её помощью можно:
- Анализировать запросы на естественном языке
- Автоматически выбирать нужную функцию
- Преобразовывать динамические параметры в строго типизированные структуры
- Проверять обязательные поля и валидировать входные данные
- Управлять порядком выполнения и ответами

## Ключевые особенности

- Natural Language Processing
Обработка запросов пользователя без ручного парсинга текста.
- Automatic Function Routing
GoPilot сам сопоставляет запрос с зарегистрированной функцией.
- Type-Safe Parameter Mapping
Динамические вводимые данные конвертируются в структуры Go.
- Built-in Validation
Генерируемая схема параметров учитывает теги required, description и др.
- Easy Integration
Простое API: регистрируете функции и задаёте системный промпт.
- Flexible Response Handling
Поддержка разных форматов ответа и «режимов» выполнения.

## Быстрый старт


import (
"context"
"github.com/SadikSunbul/gopilot"
"github.com/SadikSunbul/gopilot/clients"
"github.com/SadikSunbul/gopilot/pkg/generator"
)

type WeatherParams struct {
City string `json:"city" description:"City name" required:"true"`
}
type WeatherResponse struct {
City string `json:"city"`
Temp int `json:"temp"`
Condition string `json:"condition"`
}

func GetWeather(p WeatherParams) (WeatherResponse, error) {
return WeatherResponse{City: p.City, Temp: 25, Condition: "sunny"}, nil
}

func main() {
client, _ := clients.NewGeminiClient(context.Background(), "API_KEY", "gemini-2.0-flash")
gp, _ := gopilot.NewGopilot(client)

weatherFn := &gopilot.Function[WeatherParams, WeatherResponse]{
Name: "weather-agent",
Description: "Get weather by city",
Parameters: generator.GenerateParameterSchema(WeatherParams{}),
Execute: GetWeather,
}
gp.FunctionRegister(weatherFn)
gp.SetSystemPrompt(nil)

// Генерация + выполнение за один вызов
result, _ := gp.GenerateAndExecute("Какая погода в Москве?")
fmt.Printf("%+v\n", result)
}


Github

@golang_google
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/Golang_google/2886
Create:
Last Update:

👣 GoPilot

GoPilot — это библиотека для Go, которая позволяет вызывать ваши функции с помощью естественного языка.

⚡️ С её помощью можно:
- Анализировать запросы на естественном языке
- Автоматически выбирать нужную функцию
- Преобразовывать динамические параметры в строго типизированные структуры
- Проверять обязательные поля и валидировать входные данные
- Управлять порядком выполнения и ответами

## Ключевые особенности

- Natural Language Processing
Обработка запросов пользователя без ручного парсинга текста.
- Automatic Function Routing
GoPilot сам сопоставляет запрос с зарегистрированной функцией.
- Type-Safe Parameter Mapping
Динамические вводимые данные конвертируются в структуры Go.
- Built-in Validation
Генерируемая схема параметров учитывает теги required, description и др.
- Easy Integration
Простое API: регистрируете функции и задаёте системный промпт.
- Flexible Response Handling
Поддержка разных форматов ответа и «режимов» выполнения.

## Быстрый старт


import (
"context"
"github.com/SadikSunbul/gopilot"
"github.com/SadikSunbul/gopilot/clients"
"github.com/SadikSunbul/gopilot/pkg/generator"
)

type WeatherParams struct {
City string `json:"city" description:"City name" required:"true"`
}
type WeatherResponse struct {
City string `json:"city"`
Temp int `json:"temp"`
Condition string `json:"condition"`
}

func GetWeather(p WeatherParams) (WeatherResponse, error) {
return WeatherResponse{City: p.City, Temp: 25, Condition: "sunny"}, nil
}

func main() {
client, _ := clients.NewGeminiClient(context.Background(), "API_KEY", "gemini-2.0-flash")
gp, _ := gopilot.NewGopilot(client)

weatherFn := &gopilot.Function[WeatherParams, WeatherResponse]{
Name: "weather-agent",
Description: "Get weather by city",
Parameters: generator.GenerateParameterSchema(WeatherParams{}),
Execute: GetWeather,
}
gp.FunctionRegister(weatherFn)
gp.SetSystemPrompt(nil)

// Генерация + выполнение за один вызов
result, _ := gp.GenerateAndExecute("Какая погода в Москве?")
fmt.Printf("%+v\n", result)
}


Github

@golang_google

BY Golang




Share with your friend now:
tg-me.com/Golang_google/2886

View MORE
Open in Telegram


Golang Telegram | DID YOU KNOW?

Date: |

How to Invest in Bitcoin?

Like a stock, you can buy and hold Bitcoin as an investment. You can even now do so in special retirement accounts called Bitcoin IRAs. No matter where you choose to hold your Bitcoin, people’s philosophies on how to invest it vary: Some buy and hold long term, some buy and aim to sell after a price rally, and others bet on its price decreasing. Bitcoin’s price over time has experienced big price swings, going as low as $5,165 and as high as $28,990 in 2020 alone. “I think in some places, people might be using Bitcoin to pay for things, but the truth is that it’s an asset that looks like it’s going to be increasing in value relatively quickly for some time,” Marquez says. “So why would you sell something that’s going to be worth so much more next year than it is today? The majority of people that hold it are long-term investors.”

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

Golang from cn


Telegram Golang
FROM USA