Sobes.tech
Senior

What AI agents or chats have you used at work?

sobes.tech AI

Answer from AI

In working with Golang, I used various AI tools and chat agents to increase productivity and automate tasks. For example, I integrated OpenAI GPT-3/4 via API for code generation and documentation assistance. I also used chatbots based on the Telegram API for monitoring and managing services. For local experiments, I employed LangChain and other libraries to create chains of AI model calls.

Example of using the OpenAI API in Go:

package main

import (
	"context"
	"fmt"
	"github.com/sashabaranov/go-openai"
)

func main() {
	client := openai.NewClient("YOUR_API_KEY")
	resp, err := client.ChatCompletion.Create(context.Background(), openai.ChatCompletionRequest{
		Model: "gpt-4",
		Messages: []openai.ChatCompletionMessage{
			{Role: "user", Content: "Write an example in Go for an HTTP server"},
		},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Choices[0].Message.Content)
}

This allows for quick prompts and code examples directly during development.

What AI agents or chats have you used at work? — Golang - sobes.tech